WordPress.org

Plugin Directory

Changes between Version 1 and Version 2 of UrlCache


Ignore:
Timestamp:
12/31/05 10:57:31 (12 years ago)
Author:
mcnicks
Comment:

Update description of cache functions

Legend:

Unmodified
Added
Removed
Modified
  • UrlCache

    v1 v2  
    11One of McNicksPlugins 
    22 
    3 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 a PHP function, called '''url_cache()''' which takes a URL as an argument. 
     3I 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()'''. 
    44 
    5 The function attempts to download the file at the end of the URL it is given and, if it is successful, it will return a local URL which points to the locally cached copy of the file. If the URL is requested again, and the locally cached copy has not gone stale, then the local URL will be returned immediately. If, for any reason, there is an error, the remote URL is returned, ensuring that whatever calls '''url_cache()''' will always receive a valid URL back from it. 
     5 * 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. 
     6 * 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. 
     7 * 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. 
    68 
    7 http://mcnicks.org/plugins/url-cache/ 
     9http://mcnicks.org/wordpress/url-cache/