1 package org.jahia.soap; 2 3 import org.jahia.registries.ServicesRegistry; 4 import org.jahia.services.cache.CacheFactory; 5 6 14 15 public class CacheServer { 16 17 private ServicesRegistry sReg = null; 18 19 public CacheServer() { 20 sReg = ServicesRegistry.getInstance(); 21 } 22 23 public int getOutputCacheEntriesCount() { 24 try { 25 return CacheFactory.getHtmlCache().size(); 26 } catch (Throwable t) { 27 return 0; 28 } 29 } 30 31 public void flush() { 32 try { 33 CacheFactory.getHtmlCache().flush(); 34 } catch (Throwable t) { 35 36 } 37 } 38 39 public void flushByName(String name) { 40 try { 41 CacheFactory.getInstance().getCache(name).flush(); 42 } catch (Throwable t) { 43 44 } 45 } 46 47 } 48 | Popular Tags |