Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jadu/inspectable-stash-bundle
Symfony bundle to allow inspecting data cached with Stash
https://github.com/jadu/inspectable-stash-bundle
Last synced: 5 days ago
JSON representation
Symfony bundle to allow inspecting data cached with Stash
- Host: GitHub
- URL: https://github.com/jadu/inspectable-stash-bundle
- Owner: jadu
- License: ncsa
- Created: 2016-10-06T09:23:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-07T14:50:56.000Z (about 8 years ago)
- Last Synced: 2024-04-16T00:49:48.617Z (7 months ago)
- Language: PHP
- Size: 43.9 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Inspectable Stash bundle
========================[![Build Status](https://secure.travis-ci.org/jadu/inspectable-stash-bundle.png?branch=master)](http://travis-ci.org/jadu/inspectable-stash-bundle)
Symfony bundle to allow inspecting data cached with Stash.
## Usage
Add the bundle to your kernel to install the cache driver proxy and inspection console command:```php
class AppKernel
{
...
public function registerBundles()
{
$bundles = array(
...
new Tedivm\StashBundle\TedivmStashBundle(),
new Jadu\InspectableStashBundle\InspectableStashDriverBundle(),
...
);return $bundles;
}
...
}
```you'll also need to configure the Memcached service that should be used, for example (added to `config.yml`):
```yaml
inspectable_stash_driver:
memcached_service: my_vendor.caching.memcached_service_id```
the service will need to be an instance of the builtin [`Memcached` class](http://php.net/manual/en/class.memcached.php).
## Inspecting the cached data
You can use the console command:
```shell
app/console dump:stash:cache
```
to fetch a list of all keys stored by Stash. If you need to filter this list
for only keys matching a certain pattern, you may provide a regular expression like this:
```shell
app/console dump:stash:cache --grep 'some/prefix.*later'
```
. Finally, if you need to see the values for each cache entry too, just add the `--with-values` option, like this:
```shell
app/console dump:stash:cache --grep 'some/prefix.*later' --with-values
```
. `--with-values` may be used with or without `--grep`.## Credits
* [Dan Phillimore](http://github.com/asmblah) - Author
* [Stash caching library](https://github.com/tedious/Stash)
* [Stash bundle for Symfony](https://github.com/tedious/TedivmStashBundle)