Interface SyndeoCache


public interface SyndeoCache
Provides access to the string-based key/value Syndeo cache. A common use is to persist temporary data across different conversations, such as caching of OAuth tokens for an external service invocations. Implementations provide storage, retrieval, existence check, and removal of entries by key.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    destroy(String key_p)
    Removes the entry for the given key from the cache.
    get(String key_p)
    Retrieves the value associated with the given key.
    boolean
    has(String key_p)
    Checks whether the cache contains an entry for the given key.
    void
    set(String key_p, String value_p)
    Stores or updates the value for the given key.
  • Method Details

    • get

      String get(String key_p)
      Retrieves the value associated with the given key.
      Parameters:
      key_p - the cache key
      Returns:
      the value if present, or null if the key is missing
    • set

      void set(String key_p, String value_p)
      Stores or updates the value for the given key.
      Parameters:
      key_p - the cache key
      value_p - the value to associate with the key
    • has

      boolean has(String key_p)
      Checks whether the cache contains an entry for the given key.
      Parameters:
      key_p - the cache key
      Returns:
      true if the key exists in the cache, false otherwise
    • destroy

      boolean destroy(String key_p)
      Removes the entry for the given key from the cache.
      Parameters:
      key_p - the cache key
      Returns:
      true if an entry was present and removed, false if the key was not found