Class TestCacheManager

    • Constructor Detail

      • TestCacheManager

        public TestCacheManager()
    • Method Detail

      • getExpressionCache

        public ICache<ExpressionCacheKey,​java.lang.Object> getExpressionCache()
        Description copied from interface: ICacheManager

        Returns the cache of expression evaluation artifacts.

        This cache is meant to store artifacts of diverse nature needed along the process of parsing and executing expressions in the several languages available: Standard expressions, OGNL expressions, Spring EL expressions...

        Parsing these expressions usually results in some kind of syntax tree object that represents the expression, and this is what this cache usually stores.

        Keys are the expressions themselves (their String representation), along with a type that is normally used for identifying the nature of the object being cached (for example {"ognl","person.name"}).

        Specified by:
        getExpressionCache in interface ICacheManager
        Returns:
        the cache of expression artifacts
      • getSpecificCache

        public <K,​V> ICache<K,​V> getSpecificCache​(java.lang.String name)
        Description copied from interface: ICacheManager

        Returns a specific (non-default) cache, by its name.

        User-defined dialects might make use of additional caches (besides template, and expression) defined at custom-made implementations of this interface, and they should use this method to retrieve them by their name.

        Note the default StandardCacheManager will return null for every call to this method, as it should be custom implementations of this interface (or extensions of AbstractCacheManager or extensions StandardCacheManager) who implement these specific caches and offer their names through the ICacheManager.getAllSpecificCacheNames() method.

        Specified by:
        getSpecificCache in interface ICacheManager
        Type Parameters:
        K - the type of the cache keys
        V - the type of the cache values
        Parameters:
        name - the name of the needed cache
        Returns:
        the required cache
      • clearAllCaches

        public void clearAllCaches()
        Description copied from interface: ICacheManager

        Clears all the caches managed by this cache manager instance.

        This method is mainly intended for use from external tools that might need to clean all caches completely, without having to worry about implementation details.

        Specified by:
        clearAllCaches in interface ICacheManager