WordPress.org

Plugin Directory

wiki:UrlCache

One of McNicksPlugins

I wrote this plugin because I was getting fed up with slow responses from remote sites slowing my blog down. To get around this, I wanted to be able to keep locally cached copies of image thumbnails, for example. The url-cache plugin provides three function: url_cache(), content_cache() and xml_cache().

  • The url_cache() function attempts to copy the content of the given remote URL onto the local filesystem. If successful, the function will return a URL that points to the locally cached content. If not, the remote URL will be returned instead.
  • The content_cache() function attempts to copy the content of the given remote URL onto the local filesystem, and returns those content to the caller. Subsequent calls will return the locally cached content.
  • The xml_cache() function wraps around the content_cache() function and assumes that the content of the remote URL is actually XML. As well as caching the content, it converts the XML into a PHP data structure (using the PHP XML parser functions) and returns the data structure to the caller.

http://mcnicks.org/wordpress/url-cache/

Last modified 12 years ago Last modified on 12/31/05 10:57:31