mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOCS: Example of partial cache expiry setting.
This commit is contained in:
parent
b592d2105c
commit
2c1cb79156
@ -169,6 +169,22 @@ If you have good `$CacheKey` and `$CacheCondition` implementations, you may want
|
|||||||
improve performance.
|
improve performance.
|
||||||
[/note]
|
[/note]
|
||||||
|
|
||||||
|
Example below shows how to set partial cache expiry to one hour.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# app/_config/cache.yml
|
||||||
|
|
||||||
|
---
|
||||||
|
Name: app-cache
|
||||||
|
After:
|
||||||
|
- 'corecache'
|
||||||
|
---
|
||||||
|
SilverStripe\Core\Injector\Injector:
|
||||||
|
Psr\SimpleCache\CacheInterface.cacheblock:
|
||||||
|
constructor:
|
||||||
|
namespace: "cacheblock"
|
||||||
|
defaultLifetime: 3600
|
||||||
|
```
|
||||||
|
|
||||||
### Nested cached blocks
|
### Nested cached blocks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user