| Package | Description |
|---|---|
| org.craftercms.core.cache | |
| org.craftercms.core.cache.impl | |
| org.craftercms.core.service | |
| org.craftercms.core.service.impl |
| Modifier and Type | Method and Description |
|---|---|
void |
Cache.addScope(String scope,
int maxItemsInMemory)
Adds a new scope to the cache.
|
void |
Cache.clearAll()
Clears the contents of the entire cache.
|
void |
Cache.clearScope(String scope)
Clears the contents of the specified scope in the cache.
|
CacheItem |
Cache.get(String scope,
Object key)
Retrieves an item from a scope.
|
Collection<Object> |
Cache.getKeys(String scope)
Returns a list of the keys of the items present in the specified scope.
|
Collection<String> |
Cache.getScopes()
Returns the list of scopes this cache manages.
|
int |
Cache.getSize(String scope)
Returns the quantity of items present in the specified scope.
|
boolean |
Cache.hasKey(String scope,
Object key)
Returns true if there's and item with the specified key in the specified scope.
|
boolean |
Cache.hasScope(String scope)
Returns true if the specified scope exists in the cache.
|
void |
Cache.put(String scope,
Object key,
Object value)
Puts an item in a scope.
|
void |
Cache.put(String scope,
Object key,
Object value,
long expireAfter,
long refreshFrequency,
CacheLoader loader,
Object... loaderParams)
Puts and item in a scope.
|
boolean |
Cache.remove(String scope,
Object key)
Removes an item from a scope.
|
void |
Cache.removeScope(String scope)
Removes an existing scope and all the items that are in it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CacheImpl.addScope(String scope,
int maxItemsInMemory)
Adds a new scope to the cache.
|
void |
CacheImpl.clearAll()
Clears the contents of the entire cache.
|
void |
CacheImpl.clearScope(String scope)
Clears the contents of the specified scope in the cache.
|
CacheItem |
CacheImpl.get(String scope,
Object key)
Retrieves an item from a scope.
|
Collection<Object> |
CacheImpl.getKeys(String scope)
Returns a list of the keys of the items present in the specified scope.
|
Collection<String> |
CacheImpl.getScopes()
Returns the list of scopes this cache manages.
|
int |
CacheImpl.getSize(String scope)
Returns the quantity of items present in the specified scope.
|
boolean |
CacheImpl.hasKey(String scope,
Object key)
Returns true if there's and item with the specified key in the specified scope.
|
boolean |
CacheImpl.hasScope(String scope)
Returns true if the specified scope exists in the cache.
|
void |
CacheImpl.put(String scope,
Object key,
Object value)
Puts an item in a scope.
|
void |
CacheImpl.put(String scope,
Object key,
Object value,
long expireAfter,
long refreshFrequency,
CacheLoader loader,
Object... loaderParams)
Puts and item in a scope.
|
boolean |
CacheImpl.remove(String scope,
Object key)
Removes an item from a scope.
|
void |
CacheImpl.removeScope(String scope)
Removes an existing scope and all the items that are in it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CacheService.addScope(Context context)
Adds a new scope to the cache for the given context.
|
void |
CacheService.clearAll()
Clears the contents of the entire cache.
|
void |
CacheService.clearScope(Context context)
Clears the contents of the scope of the given context.
|
Object |
CacheService.get(Context context,
Object key)
Retrieves an item's value from the scope of the given context, or null if not found.
|
CacheItem |
CacheService.getItem(Context context,
Object key)
Retrieves an item from the scope of the given context, or null if not found.
|
Collection<?> |
CacheService.getKeys(Context context)
Returns a list of the keys of the items present in the scope of the given context.
|
Collection<String> |
CacheService.getScopes()
Returns the list of scopes this cache manages.
|
int |
CacheService.getSize(Context context)
Returns the quantity of items present in scope of the given context.
|
boolean |
CacheService.hasKey(Context context,
Object key)
Returns true if there's and item with the specified key in the scope of the given context.
|
boolean |
CacheService.hasScope(Context context)
Returns true if the scope of the given context exists.
|
void |
CacheService.put(Context context,
Object key,
Object value)
Puts an item in the scope of the given context.
|
void |
CacheService.put(Context context,
Object key,
Object value,
CachingOptions cachingOptions,
CacheLoader loader,
Object... loaderParams)
Puts and item in the scope of the given context.
|
boolean |
CacheService.remove(Context context,
Object key)
Removes an item from the scope of the given context.
|
void |
CacheService.removeScope(Context context)
Removes the scope associated to the given context
|
| Modifier and Type | Method and Description |
|---|---|
void |
CacheServiceImpl.addScope(Context context) |
void |
CacheServiceImpl.clearAll() |
void |
CacheServiceImpl.clearScope(Context context) |
Object |
CacheServiceImpl.get(Context context,
Object key) |
CacheItem |
CacheServiceImpl.getItem(Context context,
Object key) |
Collection<?> |
CacheServiceImpl.getKeys(Context context) |
Collection<String> |
CacheServiceImpl.getScopes() |
int |
CacheServiceImpl.getSize(Context context) |
boolean |
CacheServiceImpl.hasKey(Context context,
Object key) |
boolean |
CacheServiceImpl.hasScope(Context context) |
void |
CacheServiceImpl.put(Context context,
Object key,
Object value) |
void |
CacheServiceImpl.put(Context context,
Object key,
Object value,
CachingOptions cachingOptions,
CacheLoader loader,
Object... loaderParams) |
boolean |
CacheServiceImpl.remove(Context context,
Object key) |
void |
CacheServiceImpl.removeScope(Context context) |
Copyright © 2018 CrafterCMS. All rights reserved.