com.cudoy.framework.cache.AbstractCacheService Maven / Gradle / Ivy
The newest version!
package com.cudoy.framework.cache;
import org.springframework.util.Assert;
public abstract class AbstractCacheService implements CacheService {
protected boolean isFirstLevelKey(String key, String prefix){
Assert.notNull(key, "Key not null");
Assert.notNull(prefix, "Prefix not null");
if(key.startsWith(prefix)){
String left = key.substring(prefix.length() + 1);
return !left.contains(":");
}
return false;
}
}