class AbstractCacheManager implements ICacheManager {


    private volatile ICache<TemplateCacheKey,TemplateModel> templateCache;
    private volatile boolean templateCacheInitialized = false;

    private volatile ICache<ExpressionCacheKey,Object> expressionCache;
    private volatile boolean expressionCacheInitialized = false;

    
    protected AbstractCacheManager() {
        super();
    }
    
    
    public final ICache<TemplateCacheKey, TemplateModel> getTemplateCache() {
        if (!this.templateCacheInitialized) {
            synchronized(this) {
                if (!this.templateCacheInitialized) {
                    this.templateCache = initializeTemplateCache();
                    this.templateCacheInitialized = true;
                }
            }
        }
        return this.templateCache;
    }

    public final ICache<ExpressionCacheKey, Object> getExpressionCache() {
        if (!this.expressionCacheInitialized) {
            synchronized(this) {
                if (!this.expressionCacheInitialized) {
                    this.expressionCache = initializeExpressionCache();
                    this.expressionCacheInitialized = true;
                }
            }
        }
        return this.expressionCache;
    }

    
    public <K, V> ICache<K, V> getSpecificCache(final String name) {
        // No specific caches are used by default
        return null;
    }


    public List<String> getAllSpecificCacheNames() {
        // No specific caches are used by default
        return Collections.emptyList();
    }


    public void clearAllCaches() {<FILL_FUNCTION_BODY>}


    protected abstract ICache<TemplateCacheKey,TemplateModel> initializeTemplateCache();

    protected abstract ICache<ExpressionCacheKey,Object> initializeExpressionCache();
    
}


        final ICache<TemplateCacheKey, TemplateModel> templateCacheObj = getTemplateCache();
        if (templateCacheObj != null) {
            templateCacheObj.clear();
        }

        final ICache<ExpressionCacheKey, Object> expressionCacheObj = getExpressionCache();
        if (expressionCacheObj != null) {
            expressionCacheObj.clear();
        }
        
        final List<String> allSpecificCacheNamesObj = getAllSpecificCacheNames();
        if (allSpecificCacheNamesObj != null) {
            for (final String specificCacheName : allSpecificCacheNamesObj) {
                final ICache<?,?> specificCache = getSpecificCache(specificCacheName);
                if (specificCache != null) {
                    specificCache.clear();
                }
            }
        }
        
    
<no_super_class>