mattermost/server/platform/services/cache
Agniva De Sarker f9861b8666
MM-56987: Improve cache API (#26298)
This is in preparation to make the codebase
ready to use Redis. In Redis, iterating all
the keys at once is an expensive operation.
It is recommended to work on batches of keys.

Remove the Len method as it was unused.

I tried to repurpose the Keys method to iterate
on keys rather than returning all keys at once, but
it has other complicacies because the code calls
other cache functions on those keys, so to handle
the LRU cache properly, it becomes slightly more
painful.

For now, we keep it like this and rather collect
all keys from Redis and then return.

https://mattermost.atlassian.net/browse/MM-56987

```release-note
NONE
```
2024-03-01 09:46:09 +05:30
..
mocks MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
cache.go MM-56987: Improve cache API (#26298) 2024-03-01 09:46:09 +05:30
lru.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
lru_striped.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
lru_striped_bench_test.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
lru_striped_test.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
lru_test.go MM-56987: Improve cache API (#26298) 2024-03-01 09:46:09 +05:30
provider.go MM-53032: Fix module path after repo rename (#23689) 2023-06-11 10:54:35 +05:30
provider_test.go MM-56987: Improve cache API (#26298) 2024-03-01 09:46:09 +05:30