File Cache

Component ID

170577

Component name

File Cache

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

22296

Component created

Component changed

Component body

Introduction

This module allows Drupal cache bins to be stored in files instead of
storing in database. This module is available only for Drupal 7.

Related Modules

Redis, Memcache, and MongoDB are the closest caching modules. They are usually used when the website is load balanced and there are multiple servers that use single redis/memcache instance. If you don't use multiple webservers, most likely File Cache will be faster. Also, File Cache works in shared hosting webservers.

Apc and Opcache store cache bins in PHP shared memory. This makes them very fast but the space is limited and usually they are used only for cache and cache_bootstrap cache bins.

Boost generates caches of pages that are directly served by web
server. This is much faster than any solution that uses Drupal page caching system but it's also complex to setup and limited to anonymous pages.

Authcache can cach pages for anonymous and also logged-in authenticated users. Similarly to Boost, it is very fast and also complex to configure. In contrast with Boost though, it uses cache_page cache bin and so it can work with File Cache.

Relation with cacherouter and fastpath_fscache modules for Drupal 6.

Quick Start Installation

Install and enable filecache module as usual. Add the following to site's
settings.php:

$conf['cache_backends'] = array('sites/all/modules/filecache/filecache.inc');
$conf['cache_default_class'] = 'DrupalFileCache';

You may need to adjust filecache.inc path if filecache is not installed globally.

Go to Status report page admin/reports/status. Run cron. Confirm that there
are no errors and there is only a warning for using the default location.

SECURITY NOTE: The default location depends on the webserver to deny web access
to directories that start with ".ht". Check if there is HTTP error 403 Forbidden
and if it is not, you MUST NOT LEAVE THE CONFIGURATION AS IS IN THIS CASE.

If directories starting with ".ht" are denied access to, you may safely follow
the instructions in Status report to remove the warning.

Please read README.txt for further information.