MemoryCache
Contents
[
Hide
]
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.conversion.caching.ICache
public class MemoryCache implements ICache
Memory caching behaviour. Means that cache is stored in the memory Learn moreMore about caching and optimizing conversion process performance: Caching conversion results
Constructors
| Constructor | Description |
|---|---|
| MemoryCache() | Creates new instance of MemoryCache class |
Methods
| Method | Description |
|---|---|
| set(String key, Object value) | Inserts a cache entry into the cache. |
| tryGetValue(String key) | Gets the entry associated with this key if present. |
| getKeys(String filter) | Returns all keys matching filter. |
MemoryCache()
public MemoryCache()
Creates new instance of MemoryCache class
set(String key, Object value)
public void set(String key, Object value)
Inserts a cache entry into the cache.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| key | java.lang.String | A unique identifier for the cache entry. |
| value | java.lang.Object | The object to insert. |
tryGetValue(String key)
public Object tryGetValue(String key)
Gets the entry associated with this key if present.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| key | java.lang.String | A key identifying the requested entry. |
Returns: java.lang.Object - The located value or null.
getKeys(String filter)
public Iterable<String> getKeys(String filter)
Returns all keys matching filter.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| filter | java.lang.String | he filter to use. |
Returns: java.lang.Iterable<java.lang.String> - Keys matching the filter.