net.plsar.model.ViewCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plsar Show documentation
Show all versions of plsar Show documentation
PLSA.R is an Open Source Java Server + API for high demand, low latency requirements. There are no static references, no file reads, access to static fields per request. Everything is either cached and or instantiated on the fly. PLSA.R runs via one command so there are no .war files to deploy, no additional plugins to install it is a simple yet powerful alternative to container deployment environments. PLSA.R even boasts a little dependency injection for data logic. www.plsar.net
The newest version!
package net.plsar.model;
import java.util.HashMap;
import java.util.Map;
public class ViewCache {
Map cache;
public void set(String key, Object value){
this.cache.put(key, value);
}
public Object get(String key){
if(this.cache.containsKey(key)){
return this.cache.get(key);
}
return null;
}
public Map getCache() {
return cache;
}
public void setCache(Map cache) {
this.cache = cache;
}
public ViewCache(){
this.cache = new HashMap<>();
}
}