Package org.zkoss.zk.ui.http

## Class SimpleSessionCache

- java.lang.Object
- - org.zkoss.zk.ui.http.SimpleSessionCache

- All Implemented Interfaces:
    `SessionCache`

      public class SimpleSessionCache
      extends java.lang.Object
      implements SessionCache

  A simple implementation of `SessionCache`.
  Since:
    3.0.5
  Author:
    tomyeh

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SimpleSessionCache()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `destroy​(WebApp wapp)` | Destroys the session cache
    `Session` | `get​(java.lang.Object navsess)` | Retrieves a ZK session from the cache, or null if the ZK session is not stored.
    `void` | `init​(WebApp wapp)` | Initializes the session cache.
    `void` | `put​(Session sess)` | Puts a ZK session to the cache.
    `void` | `remove​(Session sess)` | Removes the ZK session from the cache.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleSessionCache

          public SimpleSessionCache()

  - ### Method Detail

    - #### init

          public void init​(WebApp wapp)

      Description copied from interface: `SessionCache`
      Initializes the session cache. It is called right after being instantiated.
      Specified by:
        `init` in interface `SessionCache`

    - #### destroy

          public void destroy​(WebApp wapp)

      Description copied from interface: `SessionCache`
      Destroys the session cache
      Specified by:
        `destroy` in interface `SessionCache`

    - #### put

          public void put​(Session sess)

      Description copied from interface: `SessionCache`
      Puts a ZK session to the cache. You can retrieve the native session by `Session.getNativeSession()`.
      Specified by:
        `put` in interface `SessionCache`
      Parameters:
        `sess` - the ZK session.

    - #### get

          public Session get​(java.lang.Object navsess)

      Description copied from interface: `SessionCache`
      Retrieves a ZK session from the cache, or null if the ZK session is not stored.
      Specified by:
        `get` in interface `SessionCache`

    - #### remove

          public void remove​(Session sess)

      Description copied from interface: `SessionCache`
      Removes the ZK session from the cache.
      Specified by:
        `remove` in interface `SessionCache`