smurf
This commit is contained in:
parent
c1de65447e
commit
3b6bcafca3
1 changed files with 8 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ public class AlbumServlet
|
|||
File base;
|
||||
String basePrefix;
|
||||
Cache imageCache;
|
||||
CacheManager cacheManager;
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
|
|
@ -51,10 +52,16 @@ public class AlbumServlet
|
|||
|
||||
PropertyConfigurator.configure("log4j.properties");
|
||||
LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Log4JLogger");
|
||||
CacheManager cacheManager = new CacheManager();
|
||||
cacheManager = CacheManager.create();
|
||||
imageCache = cacheManager.getCache("imageCache");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
imageCache.flush();
|
||||
cacheManager.shutdown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doGet(HttpServletRequest req, HttpServletResponse res)
|
||||
throws ServletException, IOException
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue