Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP
  • Overview
  • Namespace
  • Class
  • Tree
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 
<?php
namespace Apptus\Util\Cache;

/**
 * Interface for a key based string cache.
 */
interface StateCache {
    /**
     * Add a non-existing entry to the cache.
     *
     * @param string
     * @param string
     * @param int
     *            The maximum time, in seconds, this entry will be in the cache.
     * @return boolean
     *            True on success, false on failure. Returns false if the key already exists.
     */
    public function add($key, $value, $expire);

    /**
     * Remove an entry from the cache.
     *
     * @param string
     * @return boolean
     *            True on success, false on failure.
     */
    public function delete($key);

    /**
     * Get an entry from the cache.
     *
     * @param string
     * @return boolean|string
     *            Value as a string or false if key was not found.
     */
    public function get($key);

    /**
     * Get several entries from the cache.
     *
     * @param array
     *            An indexed array with the keys that should be fetched from the cache.
     * @return array
     *            An associative array of key => value pairs for all keys found.
     */
    public function getMulti($keys);

    /**
     * Replace an existing entry in the cache.
     *
     * @param string
     * @param string
     * @param int
     *            The maximum time, in seconds, this entry will be in the cache.
     * @return boolean
     *            True on success, false on failure. Return false if key does not already exist.
     */
    public function replace($key, $value, $expire);

    /**
     * Set an entry in the cache.
     *
     * @param string
     * @param string
     * @param int
     *            The maximum time, in seconds, this entry will be in the cache.
     * @return boolean
     *            True on success, false on failure.
     */
    public function set($key, $value, $expire);

    /**
     * Set several entries in the cache.
     *
     * @param array
     *            An associative array of key => value pairs.
     * @param int
     *            The maximum time, in seconds, these entries will be in the cache.
     * @return boolean
     *            True on success, false on failure.
     */
    public function setMulti($items, $expire);
}
Apptus ESales Connector PHP API documentation generated by ApiGen