Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged cache



« Prev 1 Next »
  1. FAV

    lastModified.func.php

    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...
    PHP 125 views posted 4 months ago by daemondevin
  2. FAV

    PHP website accelerator - Cloudflare-style full page caching with page rules in 1 PHP file

    # 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
    PHP 10 views posted 3 years ago by mattnicholson
  3. FAV

    Simple PHP cache technique

    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...
    PHP 8 views posted 4 years ago by a1ias
  4. FAV

    Simple PHP cache class

    A simple class to cache files (or other results) with PHP.
    PHP saved by 4 people 16 views posted 7 years ago by peckham
  5. FAV

    Query posts and cache the query

    Snippet to show a simple use of the transient API when querying posts.
    PHP 9 views posted 7 years ago by Mat_
  6. FAV

    No Cache HTTP Headers

    HTTP headers to disable caching.
    PHP saved by 4 people 6 views posted 7 years ago by ryantxr
  7. FAV

    Base display function to use Joomla! cache

    This is a base function to use with Joomla! to display the view using the Joomla cache system.
    PHP 9 views posted 7 years ago by kevincam
  8. FAV

    Simplepie with fixed Cache directory handling

    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...
    PHP 7 views posted 8 years ago by iroybot
  9. FAV

    Simple PHP Page Caching Technique

    PHP 7 views posted 8 years ago by Abe
  10. FAV

    Cache favicon from google service

    PHP 8 views posted 8 years ago by szpunk
  11. FAV

    Wordpress: Cache your $wpdb queries

    Cache the results of your wordpress database queries for faster page generation
    PHP 5 views posted 8 years ago by prwhitehead
  12. FAV

    Disable browser cache

    PHP saved by 3 people 5 views posted 9 years ago by mfigge
  13. FAV

    cache control with file modification date

    PHP saved by 2 people 7 views posted 9 years ago by ashsa
  14. FAV

    Prevent Web Page from Expiring

    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.
    PHP 8 views posted 9 years ago by bradless
  15. FAV

    https+ieX+downloads

    Donwloads weren't working with https + ie6/ie7. This line solves the problem (order is important, **no-store** must be first).
    PHP 7 views posted 9 years ago by ashsa
  16. FAV

    PHP - Cache Controls

    PHP saved by 4 people 5 views posted 9 years ago by wireplay
  17. FAV

    PHP cache Files

    PHP 4 views posted 9 years ago by silverius
  18. FAV

    Fetch & Save / Cache an image from a remote server using PHP

    PHP saved by 12 people 15 views posted 10 years ago by adamcoulombe
  19. FAV

    Easy Kohana Cache For Variable Dependent Pages

    Useful for controllers. Put this in your base class for easy caching on variable (GET, POST) dependent pages
    PHP 4 views posted 10 years ago by iloveitaly
  20. FAV

    Generate Unique Key Based on GET Vars

    Using the kohana framework for XSS protection
    PHP 5 views posted 10 years ago by iloveitaly
  21. FAV

    Prevent WordPress Stylesheet from Being Cached

    PHP saved by 3 people 4 views posted 10 years ago by andrewkhunn
  22. FAV

    PHP Remote File Cache

    use this to cache a remote file with xml, json etc
    PHP saved by 6 people 5 views posted 10 years ago by jimmysessions
  23. FAV

    json header in php

    PHP saved by 4 people 7 views posted 10 years ago by michaelfox
  24. FAV

    Cache Page Script

    PHP saved by 4 people 8 views posted 10 years ago by iTony
  25. FAV

    Simple Page Caching

    PHP saved by 2 people 8 views posted 10 years ago by iTony
  26. FAV

    file_put_contents() fix for php 4

    PHP 6 views posted 11 years ago by moonbather
  27. FAV

    Evitar Cache - Avoid Cache

    PHP 3 views posted 11 years ago by LondonWeb
« Prev 1 Next »