Simple Cache
Categories
Component ID
1963508
Component name
Simple Cache
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
1572
Component created
Component changed
Component body
A Simple cache module that works for Anonymous & Authenticated users.
Stores the HTML of the whole page in cache table and serves it after Drupal core functions are executed, not requiring to process theme functions and thus saving time.
Pages are cached by URL & user role.
XHProf Callgraph of functions called
before cache: before_callgraph.png
after cache: after_callgraph.png
Advantages:
- All code that does things like setting sessions($_SESSION) will work, for example: quiz module.
- easy to install & configure.
- can work along with other caching modules(example: exclude node/*/take pages in boost and use simple_cache for those pages)
- will cause no harm if you know what you are getting.(cached page source code is same for users of that role, irrespective of page logic)
Use cases:
- For pages which can't be cached by any other means because of sessions, or drupal_page_is_cacheable() is FALSE.
- If the page logic has to be executed and the page view doesn't depend on that logic.(example: Quiz module)
TODO:
Page include/exclude (default: exclude admin/*)- compress HTML
- stop theme functions
- expire cache
- only bootstrap what is required
- change module weight accordingly
- test dynamic content with Ajax blocks
debug mode: drupal_set_titleinclude/exclude per user rolecache per user role- handle 404 & 403 errors
- bypass unnecessary modules & hooks [cache_set('hook_info'); cache_set('bootstrap_modules')]
- ignore ?destination parameter
- developer API function to clear cache
- memcache documentation. debugging. database cache tables are empty with memcache.
- Button on the configuration form to clear Cache.
