Skip to content

Instantly share code, notes, and snippets.

View diarmuidie's full-sized avatar

Diarmuid Mac Namara diarmuidie

View GitHub Profile

Keybase proof

I hereby claim:

  • I am diarmuidie on github.
  • I am diarmuidie (https://keybase.io/diarmuidie) on keybase.
  • I have a public key ASDUlVEDGUwJuT81JixQ8Uokt_BOhQa5oKAOfgt0l2fLsgo

To claim this, I am signing this object:

@diarmuidie
diarmuidie / PublicCacheStrategyBodyKey.php
Created November 26, 2016 14:41
Example of using the request body to generate a cache key for Kevinrob/guzzle-cache-middleware. This is useful if you want to cache POST requests that have the request params in the body.
<?php
namespace Diarmuidie\Strategy;
use Kevinrob\GuzzleCache\Strategy\PublicCacheStrategy;
use Psr\Http\Message\RequestInterface;
class PublicCacheStrategyBodyKey extends PublicCacheStrategy
{
/**