Skip to content

Instantly share code, notes, and snippets.

@fenos
Last active July 29, 2017 13:23
Show Gist options
  • Save fenos/a175124b46bc96bb72e3795e4c7991b9 to your computer and use it in GitHub Desktop.
Save fenos/a175124b46bc96bb72e3795e4c7991b9 to your computer and use it in GitHub Desktop.
<?php
use Gousto\Replay\Replay;
use Gousto\Replay\RetryLogicException;
class AppCacheManager extends CacheManager {
public function store($name = null)
{
try {
return Replay::retry(3, function() use ($name) {
return parent::store($name);
});
} catch(RetryLogicException $e) {
return $this->createNullDriver();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment