mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9682 from silverstripe-terraformers/feature/partial-cache-docs
DOCS: Example of partial cache expiry setting.
This commit is contained in:
commit
a712000404
@ -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