Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged cache



« Prev 1 Next »
With this snippet you will have the ability to deliver the most recent version of any file. When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy. By appending a GET value (the UNIX timestamp) to, f...
0 36667 posted 6 years ago by daemondevin
# Slick.php PHP full page cache with Cloudflare-style page rules. No DNS changes required, just upload the PHP file, configure and then include from your main application controller (e.g. index.php
0 4138 posted 9 years ago by mattnicholson
This is a little code snippet that I use in almost every project that isn’t based on a popular CMS. Since its fairly expensive to hit the database on every page load, its a smart idea to cache the plain HTML markup of your page and serve that up. Y...
0 3153 posted 11 years ago by a1ias
A simple class to cache files (or other results) with PHP.
1 3291 posted 13 years ago by peckham
Snippet to show a simple use of the transient API when querying posts.
0 1908 posted 13 years ago by Mat_
HTTP headers to disable caching.
1 3182 posted 14 years ago by ryantxr
This is a base function to use with Joomla! to display the view using the Joomla cache system.
0 2962 posted 14 years ago by kevincam
Simplepie per default uses relative paths to generate the cache filename. Whenever I use Simplepie I run into the same problem, that the cache directory can't be located. This is why I modify the file everytime. Here's my version (with a hardcoded p...
0 3207 posted 14 years ago by iroybot
0 2944 posted 14 years ago by szpunk
Cache the results of your wordpress database queries for faster page generation
0 2941 posted 15 years ago by prwhitehead
1 3240 posted 15 years ago by mfigge
I use the following code to prevent a user from getting a "webpage expired" message when hitting the back button on a page where the search results are also on the page with the form.
0 2824 posted 15 years ago by bradless
Donwloads weren't working with https + ie6/ie7. This line solves the problem (order is important, **no-store** must be first).
0 2631 posted 15 years ago by ashsa
2 1835 posted 15 years ago by wireplay
0 2914 posted 16 years ago by silverius
Useful for controllers. Put this in your base class for easy caching on variable (GET, POST) dependent pages
0 1592 posted 16 years ago by iloveitaly
Using the kohana framework for XSS protection
0 1883 posted 16 years ago by iloveitaly
use this to cache a remote file with xml, json etc
2 2470 posted 17 years ago by jimmysessions
1 2143 posted 17 years ago by michaelfox
2 2042 posted 17 years ago by iTony
1 2018 posted 17 years ago by iTony
0 2027 posted 17 years ago by moonbather
0 1566 posted 18 years ago by LondonWeb
« Prev 1 Next »