Context Cache is module which lets you control caching and expiration through Context. For example, for one content type you can set its cache for two hours while for another content type you can set it for 30 minutes. In another use-case you can set an expiration of five minutes for the homepage and 30 minutes for any page in the news section. In case you use an external cache this module sets the proper headers for expiration.
- Context module, version 3.x, http://drupal.org/project/context
- Chaos tools which is required by Context, http://drupal.org/project/ctools
- If using Drush, "drush dl context_cache" and then "drush en context_cache" otherwise unpack, place and enable just like any other module.
- Navigate to Administration » Configuration » Development » Performance (admin/config/development/performance) and make sure page cache is enabled if you're looking to control your Drupal cache with this module. If you are using an external cache you don't need to enable page caching.
- Navigate to Administration » Structure » Context (admin/structure/context) and click on a context or create a new one. Under Reactions the Add Reaction pull-down menu will give you a new option, Cache.
Display Cache provides a simple way to cache the html of a specific entity endered in a specific view mode.
The idea is to let each entity handle its own cache independent of external caching strategies. So the cache only refreshes if the displayed entity is actually changed in any way.
Comparision to other caching methods
Panels and Views
Panels and views provide a time-based caching mechanism. You can configure the time to elapse before the cache is rebuilt.
If a cached pane in Panels is used to display an entity and something is changed on this entity, the user has to wait until the configured caching time is elapsed before he gets the results displayed.
If a cached view is used to display serveral entities and a new entity is added, which should be displayed within the view, the user has to wait also, before he gets the new Views results.
External caching mechanisms
External caching mechanisms like Varnish provide a good caching method unless the project works with logged in users. The request will not be cached bacause of the cookies sent within the call.
You need Diplay Cache if you need a caching mechanism andRead more
var s = document.createElement('script');
s.async = true;
s.src = script.data;
var x = document.getElementsByTagName('script');
Using this module, you can specify a script to be loaded asynchronously in two basic ways:
- By adding "async_js" => TRUE to the options array in drupal_add_js().
- By calling async_js_add_js("path/to/your/script.js") which bypasses drupal_add_js(), gets you the same result, and may be a touch faster.
Callback functions: Specify a callback function to be fired once the script has loaded. This can be done by adding
"async_callback" => "your_function_name" to the options array in either drupal_add_js() or async_js_add_js(). The function must exist in the global scope.
Adds contextual link “Clear cache” for:
Adds link for clearing current page cache (Boost supported too).
- Clears specific cache bin without flushing the whole site cache.
- Allows to clear cache without full administrator permissions.
- Provides setting to clear current page cache automatically when clearing Block, Views or Panels cache.
- Admin menu and Shortcut integration
To access “Clear cache” link user needs permissions “Use contextual UI Cache Clear links” and “Use contextual links” of course!
Designed for both development and production.
- Contextual links (core)
Other modules which can be useful (not alternatives):Read more
This is a demo module to for the upcoming Purge 2.x api. This module enables Purging of reverse proxy caches for the Drupal Shrubberies platform.
This is module is currently incomplete and should not be used on production shrubberies.
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.
- 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)
- 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)