cache

Cache Function for PHP

This is a fantastic function that will allow you to cache your data. By default it will cache using memcache, however if you do not have memcache installed or a connection cannot be achieved it will fall back to file based cache. The single function supports cache read, cache write, cache clear key and cache clear all. The cached data can be given an expirey time so that your data does not become stale. Usage is very simple and the performance results of caching using memcache are fantastic.

Clear All Cache in Drupal

Quick code snippet, just drop this into clearcache.php and then load it in your browser.

Install Memcache onto cPanel running CentOS

Every time I install Memcache on cPanel I get a little bit stuck, so I wrote this quick guide in the hopes of helping myself next time and also helping other people who want the advantages of super fast caching.

Image Cache using phpThumb and Mod_Rewrite

Generate thumbs by visiting a URL such as your.com/thumbs/50x50/images/image.jpg. This will create a 50x50px thumbnail of your.com/images/image.jpg.

The thumb will be stored on your server at your.com/thumbs/50x50/images/image.jpg so the next request for the same image will be loaded without loading php for ultra fast image cache.

found a problem with imagecache not creating thumbs in drupal

I was building a site for a client and all imagecache stopped working before I uploaded to the live server.

When I uploaded, all of a sudden imagecache stopped working. I checked the usual things (permissions, original image exists) and everything was fine.

Syndicate content