jalmenarez / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

optional support for Memcache #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Memcache is an order of magnitude faster than file access.

Most systems using memcache use a singleton, and memecache doesn't like
having multiple simultaneous connections from a single process.  It may be
a good idea to turn the option on by setting a global var to a memcache object.

Original issue reported on code.google.com by thelonec...@gmail.com on 13 May 2007 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by rgr...@gmail.com on 20 May 2007 at 12:10

GoogleCodeExporter commented 9 years ago
This is a great idea and is very easy to implement. If someone has, please let 
me know..

Original comment by pdt...@gmail.com on 23 Jan 2008 at 8:10

GoogleCodeExporter commented 9 years ago
To use Memcache in v2 you'd just need a wrapper class that implemented
Cache_Lite_File's get() and save() methods. The wrapper would need to store the 
last
modified time in memcache with the content, and make sure get() failed when
self::$_options['lastModifiedTime'] was later than the stored time.

Then you'd subclass Minify and rewrite _setupCache() to instantiate the wrapper:
http://code.google.com/p/minify/source/browse/trunk/lib/Minify.php#250

When v2 is released, I'd be willing to look at patches for this.

Original comment by mrclay....@gmail.com on 29 Feb 2008 at 12:37

GoogleCodeExporter commented 9 years ago

Original comment by mrclay....@gmail.com on 14 May 2008 at 4:41