2017 © Pedro Peláez
 

library cachelink-client-php

A PHP client for the cachelink-service

image

aol/cachelink-client-php

A PHP client for the cachelink-service

  • Friday, August 25, 2017
  • by jakeasmith
  • Repository
  • 23 Watchers
  • 0 Stars
  • 9,246 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 27 Versions
  • 0 % Grown

The README.md

cachelink PHP client

A PHP client for AOL cachelink., (*1)

Build Status Coverage Status Latest Stable Version Latest Unstable Version License, (*2)

Install

composer require aol/cachelink-client-php

Usage

<?php

use Aol\CacheLink\CacheLinkClient;

// The base URL for where the cache service is hosted.
$cache_service_base_url = 'http://localhost:8899';

// The timeout in seconds for talking to the service (this is optional).
$timeout = 3;

// Whether to set detailed data in cachelink for retrieval later (TTL, associations, metadata, etc.).
$set_detailed = true;

// Create the client.
$cache = new CacheLinkClient($cache_service_base_url, $timeout, $set_detailed);

// Add a Predis client for direct redis gets.
$cache->setupDirectRedis(new \Predis\Client(...));

// Set a value.
$cache->set('foo', 'bar', 3000);

// Get a value - outputs "bar".
echo $cache->get('foo')->getValue();

// Clear "foo".
$cache->clear(['foo']);

Get Many

$cache = new CacheLinkClient(...);

$items = $cache->getMany(['foo', 'bar', 'baz']);

foreach ($items as $item) {
    $item->getKey();          // The cache key for the item.
    $item->isHit();           // Whether the item is a cache hit.
    $item->isMiss();          // Whether the item is a cache miss.
    $item->getValue();        // The value from cache, null if there was none.
    $item->getTtlMillis();    // The item's original TTL in millis or null if none.
    $item->getMetadata();     // The item's original metadata or an empty array if none.
    $item->getAssociations(); // The item's original associations or an empty array if none.
}

Simple Gets

$cache = new CacheLinkClient(...);

// Get the value for the "foo" key from cache or null if a miss.
$value = $cache->getSimple('foo');

// Get the values for the "foo", "bar", and "baz" keys from cache or nulls if misses.
$values = $cache->getManySimple(['foo', 'bar', 'baz']);

License

Copyright © 2013 AOL, Inc., (*3)

All rights reserved., (*4)

MIT, (*5)

The Versions

25/08 2017

dev-master

9999999-dev

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

25/08 2017

10.0.1

10.0.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

25/08 2017

10.0.0

10.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

25/08 2017

dev-feature/encryption

dev-feature/encryption

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

23/05 2017

9.0.0

9.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

23/05 2017

dev-feature/unserialize

dev-feature/unserialize

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

03/05 2017

8.0.1

8.0.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

03/05 2017

8.0.0

8.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

03/05 2017

dev-feature/redis-cluster

dev-feature/redis-cluster

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

16/06 2016

7.1.0

7.1.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

25/03 2016

7.0.0

7.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

01/08 2015

6.0.0

6.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

01/08 2015

5.0.3

5.0.3.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

01/08 2015

5.0.2

5.0.2.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

01/08 2015

5.0.1

5.0.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

01/08 2015

5.0.0

5.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

17/06 2015

4.0.2

4.0.2.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

17/06 2015

4.0.1

4.0.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

17/06 2015

4.0.0

4.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

16/06 2015

3.1.0

3.1.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

16/01 2015

3.0.0

3.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

22/10 2014

2.0.0

2.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

22/09 2014

1.2.1

1.2.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

05/09 2014

1.1.0

1.1.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

05/09 2014

1.2.0

1.2.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

04/09 2014

1.0.1

1.0.1.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar

03/09 2014

1.0.0

1.0.0.0

A PHP client for the cachelink-service

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ralph Khattar