All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sdl.dxa.caching.TridionNoCacheConfiguration Maven / Gradle / Ivy

Go to download

Tridion Common contains common code for Tridion for other DXA artifacts expect model-specific (like DD4T)

The newest version!
package com.sdl.dxa.caching;

import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.support.CompositeCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
@Profile("dxa.no-cache")
public class TridionNoCacheConfiguration extends CachingConfigurerSupport {

    @Bean(name="compositeCacheManager")
    @Override
    public CacheManager cacheManager() {
        CompositeCacheManager compositeCacheManager = new CompositeCacheManager();
        compositeCacheManager.setFallbackToNoOpCache(true);
        return compositeCacheManager;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy