PHPDaemon\Cache\CappedStorageHits::__construct PHP Method

__construct() public method

Constructor
public __construct ( integer $max = null )
$max integer Maximum number of cached elements
    public function __construct($max = null)
    {
        if ($max !== null) {
            $this->maxCacheSize = $max;
        }
        $this->sorter = function ($a, $b) {
            if ($a->hits === $b->hits) {
                return 0;
            }
            return $a->hits < $b->hits ? 1 : -1;
        };
    }
CappedStorageHits