Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement http caching support through cacheable dispatcher behavior.
Note: It's best to read up on joomlatools/joomlatools-framework#36 to if you are not familiar with http caching
Browser Caching
See: joomlatools/joomlatools-framework#183
Server caching
Implemented a server side caching mechanism through the build in Joomla caching adapters.
Cache key
The server side cache key is based on the url, user and format, by not using the contents of the page we can return the response from cache for subsequent requests for the same resource. The longer our max-age, the longer the resource will remain valid in our server cache.
Invalidation
Using a passive cache cleanup mechanism. Files are stored on disk for max 1 week, after which they are garbage collected. This ensure that local cache is cleared for url's that are not requested, or no longer exists.
Configuration
Configuration is provided at two levels:
1. Global
Globally the cache can be configured by adding a docman.php file to the /joomla-pages root folder with the following config options:
2. Frontmatter
The cache can be disabled per page and the cache time can also be set. The frontmatter property is
The time is specified in seconds.