Constructor and Description |
---|
OrientDbCache()
Constructor with global database document pool.
|
OrientDbCache(com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool databaseDocumentPool)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CacheEntry |
fetch(String key)
Fetches an entry from the cache if it's there and has not yet expired.
|
void |
invalidate(String tag)
Makes sure that all tagged entries are un-fetchable.
|
void |
prune()
Removes expired cache entries.
|
void |
reset()
Removes all entries in the cache.
|
void |
store(String key,
CacheEntry entry)
Stores an entry in the cache.
|
public OrientDbCache()
public OrientDbCache(com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool databaseDocumentPool)
databaseDocumentPool
- The database document pool.public void store(String key, CacheEntry entry)
Cache
CacheEntry.getExpirationDate()
, although it may very well
be un-fetchable sooner.
Keys are unique to the cache. Storing for a key that already exists will replace the entry if it exists.
public CacheEntry fetch(String key)
Cache
public void invalidate(String tag)
Cache
invalidate
in interface Cache
tag
- The cache tagpublic void prune()
Cache
Copyright © 2009-2016 Three Crickets LLC.