1 16 17 package org.apache.jetspeed.services.portletcache; 18 19 import org.apache.turbine.services.TurbineServices; 20 21 28 public class PortletCache { 29 30 35 public static void addCacheable( Cacheable item ) { 36 37 PortletCacheService gcs = (PortletCacheService)TurbineServices 38 .getInstance() 39 .getService( PortletCacheService.SERVICE_NAME ); 40 41 gcs.addCacheable( item ); 42 } 43 44 49 public static void removeCacheable( String handle ) { 50 51 PortletCacheService gcs = (PortletCacheService)TurbineServices 52 .getInstance() 53 .getService( PortletCacheService.SERVICE_NAME ); 54 55 gcs.removeCacheable( handle ); 56 57 } 58 59 64 public static Cacheable getCacheable( String handle ) { 65 66 PortletCacheService gcs = (PortletCacheService)TurbineServices 67 .getInstance() 68 .getService( PortletCacheService.SERVICE_NAME ); 69 70 return gcs.getCacheable( handle ); 71 } 72 73 } 74 | Popular Tags |