Package org.ametys.core.minimize
Class SourceMapCache
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.minimize.SourceMapCache
- All Implemented Interfaces:
LogEnabled,Initializable,Component,Serviceable
public class SourceMapCache
extends AbstractLogEnabled
implements Component, Serviceable, Initializable
A simple cache for source maps from files
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractCacheManagerCacheManager used to create and get cacheprotected SourceResolverExcalibur source resolverstatic final StringThe avalon ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a value from the cachevoidvoidPut a source map into the cachevoidservice(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon ROLE -
_cacheManager
CacheManager used to create and get cache -
_sourceResolver
Excalibur source resolver
-
-
Constructor Details
-
SourceMapCache
public SourceMapCache()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
put
Put a source map into the cache- Parameters:
uri- The uri of the source mapcontent- The content of the source maplastModified- The last modified date of the source map- Throws:
IOException- If the uri is invalid
-
get
Get a value from the cache- Parameters:
uri- The uri of the source map- Returns:
- The data, or null if the uri is not in the cache
-