2017 © Pedro Peláez
 

library cache

Manage pool items

image

seeren/cache

Manage pool items

  • Monday, April 2, 2018
  • by seeren
  • Repository
  • 0 Watchers
  • 0 Stars
  • 132 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Seeren\Cache

Build Require Coverage Download Codacy Badge Version, (*1)

Cache items in pool, (*2)

Installation

Seeren\Cache is a PSR-6 cache interfaces implementation, (*3)

composer require seeren/cache

Seeren\Cache\StreamCacheItemPool

Store item in stream pool, (*4)

use Seeren\Cache\Pool\StreamCacheItemPool;

$pool = new StreamCacheItemPool();

$item = $pool
    ->getItem('foo')
    ->expiresAfter(5);

if (!$item->isHit()) {
    $item->set("item data");
    $pool->save();
}

$data = $item->get();

By default, cache folder is in /var/cache, (*5)

project/
└─ var/
   └─ log/

Seeren\Cache\CacheItem

Use item for manage Last-Modified with the extra method last, (*6)

$response = $response
    ->withHeader("ETag", $eTag)
    ->withHeader("Last-Modified", $item->last())
    ->withHeader("Cache-Control", "public, max-age=" . $timeToLive)
    ->withHeader("Expires", $item->last(true));

Passing true at last add the timeToLive to the lastSave timestamp, (*7)


License

This project is licensed under the MIT License, (*8)

The Versions

02/04 2018

dev-master

9999999-dev

Manage pool items

  Sources   Download

MIT

The Requires

 

The Development Requires

cache psr-6 pool item

01/04 2018

v1.2.2

1.2.2.0

Manage pool items

  Sources   Download

MIT

The Requires

 

The Development Requires

cache psr-6 pool

10/06 2017

v1.2.1

1.2.1.0

Cache pool item's

  Sources   Download

MIT

The Requires

 

The Development Requires

cache psr-6 pool item

15/04 2017

v1.1.2

1.1.2.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

14/04 2017

v1.1.1

1.1.1.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

The Development Requires

25/02 2017

v1.1

1.1.0.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

30/10 2016

v1.0.4

1.0.4.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

30/10 2016

v1.0.3

1.0.3.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

30/10 2016

v1.0.2

1.0.2.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires

 

29/10 2016

v1.0.1

1.0.1.0

Psr 6 implementation with stream interface adapter

  Sources   Download

MIT

The Requires