- Site Template
- WordPress Theme
- Blogging Theme
- CMS Theme
- Marketing Template
- eCommerce Theme
- Forum Theme
- Flash Template
- PSD Web Template
- .NET Script
- PHP Script
- HTML5 Code
- CSS Style
- Edge Animate Template
- Muse Template
- TypeEngine Theme
- Static Site Generator
- Sketch Template
CodeCanyon PHP Simple Cache 4169137
PHP Script \ Miscellaneous
Mysql \ Performance \ Speed \ Time \ Load \ Cache \ Caching \ Database \ Faster
PHP Script - PHP Simple Cache 4169137 by techmynd @ CodeCanyon
PHP Script \ Miscellaneous
- Updated live demo
- Updated documentation
- Updated main cache script
- Added absolute path support for cache folder
PHP Simple Cache lets you create cache for any PHP website quickly and easily. Use this script to speed up your website. Fully configurable, plug and play, extremely easy to use supercache that decreases execution time and server load dramatically.
PHP Simple Cache Features
- Easy to integrate and configure with any website (just include file)
- Use online at your webhost or locally (localhost, wamp, xampp)
- Lightweight single file (1.4kb)
- Only connects to the database when cache has expired or cache page does not exist
- Set cache lifespan easily
- Ability to delete cached files
- Ability to turn on/off for individual pages
- Makes PHP website responsive
- Reduces server load and resources consumption
- Reduces database queries requests
- Reduces server processing per request
- Increases page loading speed (resulting in better Google Page Rank)
PHP is a programming language to create dynamic websites. Dynamic websites display content that is requested by user. This content changes if user submits form, logs in, sends email, submits comment, add/retrieve data in/from database etc. PHP scripts also retrieve data from database and display it on a dynamic page. Every time such page is loaded in browser, PHP server has to translate PHP script, request database server, retrieve data and then display it for user.
Cache reduces server’s effort. Cache stores a translated version of page (HTML) to display it later. When this page is called again, cache verifies its cached version. If cached copy of page is available and is not expired, it will be displayed and PHP server won’t have to translate PHP scripts and connect to database server to retrieve data. This process reduces server memory usage, server effort snd server resources consumption.
If some kind of dynamic action is performed, old cache is deleted and a new fresh cached copy of page is created for later use. In this way, you website remains up and running at fast speed. A cached version of page is much faster than original dynamic page.
It is logical and based on rule that “Only go through PHP scripts and database if content of page changes. If content is same, store its copy, do not go through PHP scripts and database tables and display cached copy.”
PHP Simple Cache is a small PHP accelerator that substantially increases the speed of PHP website and improves the web page generation process by server. Basically it cahces a page that has been loaded in browser once. Next time cached HTML version of PHP page loads instead of telling PHP server to translate the PHP code again. Similarly, in case of data retrival from database server, it will cache that data and store it in cached file to display it later, instead of connecting to database again.
It enables dynamic PHP pages to load quickly and reduces server load by saving server translated page into cached files and serving that saved data on demand.
Include this script (cache.php) at the top of every page in your website that you want to be cached and that’s it. If not every page, you can also include this script in database file, configuration file or settings file of your project to cache whole website. Turn off cache for individual pages by passing a single variable to the page you do not want to be cached. If passing a variable or submitting a form, include another single script file to empty cache, so that dynamic functionality of website remains intact.
In short, cache all PHP website, but when performaing a dynamic action on any individual page, refresh cache to ensure site’s stable functionality and optimal performance at the same time. See docs for implementation guidance.
Grab cache.php file, open it in editor, adjust ‘cache folder’ settings (name and location), adjust cache time and include cache.php in website. That’s it. By default settings, you need to create siteCache folder at root of your website. Place cache.php file in root of website and you are good to go after including cache.php file in your project, like below.
Turn Cache Off for Individual Page
If you perform any dynamic task/action at website, or session data changes, or user logs in etc. you will need to delete cache to see changes or updates.
Keywords: bootstrap, cache, caching, database, faster, load time, mysql, performance, php, speed.
Android, Builder, Business, Clean, Corporate, Creative, Design, Ecommerce, Email, Fashion, Gallery, Image, Iphone, Jquery, Landing, Magazine, Magento, Marketing, Minimal, Mobile, Modern, Multi, Multipurpose, Parallax, Personal, Photography, Plugin, Portfolio, Product, Responsive, Retina, Simple, Slider, Social, Store, Template, Theme, Video, Woocommerce, Wordpress
Show all tags
Show all tags
- ThemeForest QUOTE Quotation or Survey Form Wizard 19296301
- ThemeForest Taplak Modern Food Recipe PSD Template 19275593
- ThemeForest Hena Minimal Portfolio Template 19277042
- ThemeForest NotificationApp Responsive Notification Email HTML Templates 19295635
- ThemeForest Campton Responsive Magento Theme 19155920
- ThemeForest Jacqueline Spa & Massage Salon Site Template 19330375
- ThemeForest MOCHA Ecommerce PSD Tempate 19296527
- ThemeForest Flyapp Bootstrap Landing Page 19227068
- ThemeForest Responsive Email Template FORTUNA Multipurpose Email With Email Template Builder Online Access 19298096
- ThemeForest Frecuencia 100& Modules Email & Online Template Builder 19296668