File cache class 2008.02.03 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News File cache class 2008.02.03 (Default branch)
# 1  
Old 02-04-2008
File cache class 2008.02.03 (Default branch)

File cache class is a PHP Class that can cache arbitrary data in files in order to reduce the time necessary to regenerate pages or other types of data that do not change every time they are requested. It features safe locking of cache files to avoid data corruption caused by simultaneous accesses during cache file updates, portable locking schemes, and the ability to set a cache expiry date or timeout period. Cache files can store user-defined headers besides the cached data, and also standard headers used in HTTP like content-length:, date:, expires:, etag:, etc. It has been tested under Linux, SunOS and Windows. License: Freely Distributable Changes:
This release fixes a bug that was preventing the reading of cache file headers longer than the default file buffering length limit.Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
HTTP_CACHE_LAST_MODIFIED(3)						 1					       HTTP_CACHE_LAST_MODIFIED(3)

http_cache_last_modified - Caching by last modification

SYNOPSIS
bool http_cache_last_modified ([int $timestamp_or_expires]) DESCRIPTION
Attempts to cache the sent entity by its last modification date. If the supplied argument is greater than 0, it is handled as timestamp and will be sent as date of last modification. If it is 0 or omit- ted, the current time will be sent as Last-Modified date. If it's negative, it is handled as expiration time in seconds, which means that if the requested last modification date is not between the calculated timespan, the Last-Modified header is updated and the actual body will be sent. A log entry will be written to the cache log if the INI settinghttp.log.cache is set and the cache attempt was successful. Note This function may be used in conjunction with http_send_data(3), http_send_file(3) and http_send_stream(3). PARAMETERS
o $timestamp_or_expires - Unix timestamp RETURN VALUES
Returns FALSE or exits on success with 304 Not Modified if the entity is cached. See the INI settinghttp.force_exit for what "exits" means. EXAMPLES
Example #1 A http_cache_last_modified(3) example Caching for 5 seconds. <?php http_cache_last_modified(-5); printf("%s ", http_date()); ?> SEE ALSO
http_cache_etag(3), the HttpResponse class if you are using PHP 5.1.0 and above. PHP Documentation Group HTTP_CACHE_LAST_MODIFIED(3)