Class ResourceCache

  • All Implemented Interfaces:
    Cache, java.util.Observer

    public class ResourceCache
    extends FileCacheBase
    This is a cache for Resource objects. A Resource is basically a wrapper of a file from which you can retrieve the file contents as a string or as a DOM Document.
    Since:
    MicroStrategy Web 7.5.1
    • Method Detail

      • doLoad

        protected java.lang.Object doLoad​(CacheHint hint)
                                   throws CacheException
        Description copied from class: FileCacheBase
        This abstract method is called by the load method to perform the actual loading. In this method, subclasses needs to load the file and parse it, and return the object they actually want cached.
        Specified by:
        doLoad in class FileCacheBase
        Throws:
        CacheException
        Since:
        MicroStrategy Web 9.0.0
      • getKey

        protected java.lang.Object getKey​(CacheHint hint)
        Description copied from class: FileCacheBase
        Returns the key of the cache element based on the hint. In this scenario, the hint itself is the key.
        Overrides:
        getKey in class FileCacheBase
        Parameters:
        hint - the hint object.
        Returns:
        the key
      • getPath

        protected java.lang.String getPath​(CacheHint hint)
        Returns the path for the given hint. This implementation uses the path value.
        Overrides:
        getPath in class FileCacheBase