Class FileResourceCache
java.lang.Object
org.episteme.core.io.cache.FileResourceCache
- All Implemented Interfaces:
ResourceCache
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the cache.Retrieves data from the cache.static FileResourceCachevoidPuts data into the cache.voidsetTtl(long ttlMillis) Sets the time-to-live for cached entries.
-
Method Details
-
getInstance
-
setTtl
public void setTtl(long ttlMillis) Sets the time-to-live for cached entries.- Parameters:
ttlMillis- TTL in milliseconds
-
get
Description copied from interface:ResourceCacheRetrieves data from the cache.- Specified by:
getin interfaceResourceCache- Parameters:
key- unique identifier (e.g., "pubchem_aspirin")- Returns:
- Optional containing data if found
-
put
Description copied from interface:ResourceCachePuts data into the cache.- Specified by:
putin interfaceResourceCache- Parameters:
key- unique identifierdata- data to store
-
clear
public void clear()Description copied from interface:ResourceCacheClears the cache.- Specified by:
clearin interfaceResourceCache
-