-
Notifications
You must be signed in to change notification settings - Fork 12
3.5. Setting up the Cache
Caching can happen in three flavors.
- Caching a database call or result set
- Caching a template block
- Caching an entire page
Cradle uses a cache to deal with a database call or result set. Caching is usually volatile, in that we cannot rely that the data will always exist (persistent) in a cache. But overall using a cache is the fastest way to retrieve data none the less because it does not compute anything to return data. It just looks for a key and returns its value.
...
'redis-main' => [
'scheme' => 'tcp',
'host' => '127.0.0.1',
'port' => 6379
]
...
INFORMATION: there isn't anything you need to do after a cache is configured. It
should just work.
If you need to truncate data from Redis you can do so with the following commands.
$ bin/cradle redis flush
$ bin/cradle redis flush --schema profile
2.B. Reference: Validation Types
2.D. Reference: Indexes & Relations
3.A. Reference: Cradle on Shared Hosts
3.B. Reference: Command Line Tools
3.C. Reference: Architecture Recommendations
4.4. Intro to Handlebars Templating
4.B. Reference: Handlebars Helpers
4.C. Reference: Doon Interfaces
4.D. Reference: Global Package Methods