Elgg\Cache\Pool\StashWrapper::createEphemeral PHP Метод

createEphemeral() публичный статический Метод

Create an in-memory implementation of the pool.
public static createEphemeral ( ) : StashPool
Результат StashPool
    public static function createEphemeral()
    {
        return new self(new Stash\Pool(new Stash\Driver\Ephemeral()));
    }

Usage Example

Пример #1
0
 /**
  * Stash recommends always calling $item->lock() on miss to make sure that
  * the caching is as performant as possible by avoiding multiple
  * simultaneous regenerations of the same value.
  * 
  * http://www.stashphp.com/Invalidation.html#stampede-protection
  * 
  * 1. Create a new cache
  * 2. Get any entry
  * 3. Check that Stash\Item::lock() was called
  * 4. Get the same entry
  * 5. Check that Stash\Item::lock() was *not* called
  */
 public function testEnablesStashStampedeProtection()
 {
     $pool = StashWrapper::createEphemeral();
     $this->markTestIncomplete();
 }