Skip to content

weejames/MongoDB-Output-Cache-for-CodeIgniter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MongoDB Output Cache for CodeIgniter
by James Constable
me@jamesconstable.co.uk
@weejames

06/07/2010

Intro:
This library allows you to use MongoDB as a frontend caching mechanism for CodeIgniter.  It overrides the underlying functions associated with the standard web page caching functionaloty described 
here: http://codeigniter.com/user_guide/general/caching.html

Requirements:
Existing MongoDB Server
CodeIgniter 1.7.2
PHP 5.2 (not a requirement but that's all i've tested with)
PHP MongoDB extention (pecl install mongo)

Usage:

1) Place MY_Output.php in application/libraries/ (if you've changed the subclass_prefix configuration you may need to alter the filename).
2) Place the mongodb.php in application/config/ and fill in the values appropriately.
3) Enable caching in the appropriate controllers.

The functions are syntactically compatible with the existing cache functionality and caches are still enabled using $this->output->cache(n) within your controllers. Cached pages will still persist 
until expiration, or the cache is cleared.

Note: Unlike the CodeIgniter library, this modification also takes into account the contents of the $_GET and $_POST arrays when caching data.

About

An enhancement to Code Igniters default page caching that stores the generated pages in MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published