Interface AdaptiveMostUsedLabelsCache
- All Known Implementing Classes:
AdaptiveMostUsedLabelsCacheImpl
public interface AdaptiveMostUsedLabelsCache
Adaptive most used label cache. It's idea to avoid blocking requests as much as possible
Also it allows to return expired data instead of blocking the request
If expired records are returned, they will be updated later in background
- Since:
- 7.7.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes all records from persistent cachevoid
deletePersistedRecord
(long spaceId) Removes a record from the persistent cachevoid
Removes a cache record for the entire site (global most popular labels) Does not remove cache records for spacesgetSiteRecord
(int limit) Reads most used labels for the whole site Implementation can use its own hard limit if the provided limit is too largegetSpaceRecord
(long spaceId, int limit) Reads most used labels for the particular space from cache Implementation can use its own hard limit if the provided limit is too largegetSpaceRecord
(String spaceKey, int limit) Reads most used labels for the particular space from cache Implementation can use its own hard limit if the provided limit is too large
-
Method Details
-
getSiteRecord
Reads most used labels for the whole site Implementation can use its own hard limit if the provided limit is too large- Parameters:
limit
- - limit- Returns:
- cached data
- Since:
- 7.7.0
-
getSpaceRecord
Reads most used labels for the particular space from cache Implementation can use its own hard limit if the provided limit is too large- Parameters:
spaceId
- - space id- Returns:
- cached data
- Since:
- 7.7.0
-
getSpaceRecord
Reads most used labels for the particular space from cache Implementation can use its own hard limit if the provided limit is too large- Parameters:
spaceKey
- - space key- Returns:
- cached data
- Since:
- 7.7.0
-
deleteAllPersistedRecords
void deleteAllPersistedRecords()Removes all records from persistent cache- Since:
- 7.7.0
-
deletePersistedRecord
void deletePersistedRecord(long spaceId) Removes a record from the persistent cache- Parameters:
spaceId
- - space id- Since:
- 7.7.0
-
deletePersistedRecordForSite
void deletePersistedRecordForSite()Removes a cache record for the entire site (global most popular labels) Does not remove cache records for spaces- Since:
- 7.7.0
-