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: 
<?php
namespace Apptus\Util\Cache;

/**
 * An implementation of the StateCache interface that do not keep any state.
 *
 * Set operations will report success but get operations will report failure.
 *
 * Note that this is, technically, a valid implementation of the StateCache interface,
 * as the expire times given for entries are only maximum times. Entries are allowed
 * to disappear from the cache before their expire time is up.
 */
class NoStateCache implements StateCache {
    public function add($key, $value, $expire) {
        return true;
    }

    public function delete($key) {
        return false;
    }

    public function get($key) {
        return false;
    }

    public function getMulti($keys) {
        return array ();
    }

    public function replace($key, $value, $expire) {
        return false;
    }

    public function set($key, $value, $expire) {
        return true;
    }

    public function setMulti($items, $expire) {
        return true;
    }
}
Apptus ESales Connector PHP API documentation generated by ApiGen