if (cfg.ignoreModifications())
writer = null;
if (cfg.singletonStore().enabled() && writer != null) {
writer = (writer instanceof AdvancedCacheWriter) ?
new AdvancedSingletonCacheWriter(writer, cfg.singletonStore()) :
new SingletonCacheWriter(writer, cfg.singletonStore());
}
if (cfg.async().enabled() && writer != null) {
writer = createAsyncWriter(writer);