Class CacheableJspPage

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.ibm.ws.jsp.runtime.HttpJspBase
com.ibm.websphere.servlet.cache.CacheableJspPage
All Implemented Interfaces:
CacheableServlet, Serializable, jakarta.servlet.jsp.HttpJspPage, jakarta.servlet.jsp.JspPage, jakarta.servlet.Servlet, jakarta.servlet.ServletConfig

public abstract class CacheableJspPage extends com.ibm.ws.jsp.runtime.HttpJspBase implements CacheableServlet
This class identifies cacheable JSPs to the fragment cache. The cache will call the getId() and getSharingPolicy() methods to obtain the caching metadata for a given execution of the JSP.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getId(jakarta.servlet.http.HttpServletRequest request)
    This executes the algorithm to compute the cache id.
    int
    getSharingPolicy(jakarta.servlet.http.HttpServletRequest request)
    This returns the sharing policy for this cache entry.

    Methods inherited from class com.ibm.ws.jsp.runtime.HttpJspBase

    _jspInit, _jspService, destroy, getServletInfo, init, jspDestroy, jspInit, service

    Methods inherited from class jakarta.servlet.http.HttpServlet

    service

    Methods inherited from class jakarta.servlet.GenericServlet

    getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.Servlet

    getServletConfig, service
  • Constructor Details

    • CacheableJspPage

      public CacheableJspPage()
  • Method Details

    • getId

      public String getId(jakarta.servlet.http.HttpServletRequest request)
      This executes the algorithm to compute the cache id.
      Specified by:
      getId in interface CacheableServlet
      Overrides:
      getId in class com.ibm.ws.jsp.runtime.HttpJspBase
      Parameters:
      request - The HTTP request object.
      Returns:
      The cache id. A null indicates that the JSP should not be cached.
    • getSharingPolicy

      public int getSharingPolicy(jakarta.servlet.http.HttpServletRequest request)
      This returns the sharing policy for this cache entry. See com.ibm.websphere.servlet.cache.EntryInfo for possible values.
      Specified by:
      getSharingPolicy in interface CacheableServlet
      Overrides:
      getSharingPolicy in class com.ibm.ws.jsp.runtime.HttpJspBase
      Parameters:
      request - The HTTP request object.
      Returns:
      The sharing policy.