Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk authored May 10, 2024
1 parent 2adda15 commit 0b6c452
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@ You can install the package via composer:
composer require vormkracht10/laravel-permanent-cache
```

Optionally, publish config files to change the default config:

```bash
php artisan vendor:publish --provider="Vormkracht10\PermanentCache\PermanentCacheServiceProvider"
```

```php
<?php

return [
// Default cache driver to use for permanent cache
'driver' => env('PERMANENT_CACHE_DRIVER', 'redis'),

// Option for cached components to add markers around output
'components' => [
// Add markers around the rendered value of Cached Components,
// this helps to identify the cached value in the rendered HTML.

// Which is useful for debugging and testing, but also for updating
// the cached value inside another cache when using nested caches
'markers' => [
'enabled' => env('PERMANENT_CACHE_MARKERS_ENABLED', true),
'hash' => env('PERMANENT_CACHE_MARKERS_HASH', env('APP_ENV') === 'production'),
],
],
];```

# Usage

All caches you create must be registered to the `PermanentCache::caches` facade.
Expand Down

0 comments on commit 0b6c452

Please sign in to comment.