Package lazyj

Class PageCache

java.lang.Object
lazyj.cache.ExpirationCache<String,CachingStructure>
lazyj.PageCache
All Implemented Interfaces:
lazyj.cache.CacheElement<String,CachingStructure>

public final class PageCache extends lazyj.cache.ExpirationCache<String,CachingStructure>
This is the page cache.
Since:
2006-10-04
Author:
costing
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Cleanup thread, takes an entry that has expired, removes it from the cache and checks if it deserves a bonus.
    static void
    Clear all the cache structures (in case of major changes to the templates ...)
    get(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier)
    Get the contents generating the key on the fly from the request and the extra modifiers
    Get the entrire contents of the cache.
    put(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier, byte[] vbContent, long lLifetime, String sContentType)
    Cache some arbitrary contents

    Methods inherited from class lazyj.cache.ExpirationCache

    get, getKeys, getRefreshTime, getValues, overwrite, put, refresh, remove, size

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • callbackOnExpiry

      protected void callbackOnExpiry(String key, CachingStructure cs)
      Cleanup thread, takes an entry that has expired, removes it from the cache and checks if it deserves a bonus.
      Overrides:
      callbackOnExpiry in class lazyj.cache.ExpirationCache<String,CachingStructure>
      Parameters:
      key - key that is removed
      cs - value for the key that is removed
    • getCacheContent

      public static List<CachingStructure> getCacheContent()
      Get the entrire contents of the cache.
      Returns:
      a List of CachingStructure objects that is the entire contents of the memory cache.
    • get

      public static CachingStructure get(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier)
      Get the contents generating the key on the fly from the request and the extra modifiers
      Parameters:
      request -
      sCacheKeyModifier -
      Returns:
      the structure, if exists, or null
    • clear

      public static void clear()
      Clear all the cache structures (in case of major changes to the templates ...)
      Since:
      1.0.2
    • put

      public static CachingStructure put(javax.servlet.http.HttpServletRequest request, String sCacheKeyModifier, byte[] vbContent, long lLifetime, String sContentType)
      Cache some arbitrary contents
      Parameters:
      request - incoming request
      sCacheKeyModifier -
      vbContent -
      lLifetime -
      sContentType -
      Returns:
      the newly created structure