Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Aug 28, 2024
1 parent 4b0c8bc commit a7d8924
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,9 @@ Store::invalidateContent(['my_tag:id']);

### Custom cache driver with database index
Run the migrations to add the static_cache table.
Add this section to your AppServiceProvider's register function.
```php
$this->app->booting(function () {
StaticCache::extend('redis_with_database', function ($app, $config) {
return new \Tv2regionerne\StatamicCache\Cacher\Cacher(StaticCache::cacheStore(), $config);
});
});
```

Change the half measure static cache driver to use `redis_with_database`
This add-on will automatically add a `redis_with_database` cache driver to your Statamic install. To use it change the half measure static cache driver in `config/statamic/static_caching.php` to use `redis_with_database`, and ensure `statamic.static_caching.strategy` is set to `half`.

```php
'half' => [
'driver' => 'redis_with_database',
Expand Down

0 comments on commit a7d8924

Please sign in to comment.