Link to Mod
This is a experimental cache system that uses SQLite.
The cache system state is stable if you meet the minimum system requirements.Be sure to meet all system requirements before installing. If you get any errors before you install then do not install it via the Package Manager, a MANUAL INSTALL IS REQUIRED. This mod has very strict requirements and not making sure your environment meets these requirements is taking a recoverable but inconvenient risk on your forum that I am not legally liable for.
The system works by replacing SMF's file cache with a SqLite database to store all caches. The benefits of this are very slim and in test with few queries, the system was slightly slower than file caching however after the first one or two cache calls the system is marginally faster than SMF's file cache system.Benefits over SMF's file caching
SQLite3 Cache 1.0.2 to 1.0.4 Minimum RequirementsSQLite Cache 1.0.5 and Greater Minimum Requirements
- Longer key name support.
- No illegal key characters.
- One file in cache dir.
- Slight speed enhancements in a medium to heavily cached site. (May be slower on a lightly cached site.)
- PHP 5 to 5.3.x
- SQLite 2 or 3
- Zlib Output Compression
Installation with lower or higher system requirements are not recommend and may render site inoperable.License
Copyright (c) 2012, Russell Najar (SiberInc)Change Log1.0
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the SiberInc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Fixed bad path in installation script.
+ Transactions are for everything now. (Speed enhancement)
+ Turned off synchronous pragma. (Speed enhancement with possibility of corruption)1.0.2
- Removed initialization call from main index.php
* Rewrite on OB side since we are using transactions. (May be for the worse or bad, example of possible mod affected Pretty URLs)
+ Set journal mode to memory. (Once again a corruption risk in the even of sudden power loss.)1.0.3
+ Added sicache_clean(), replacement for SMF's clean_cache in Subs.php.1.0.4
* Removed useless get queries on a new db cache.
* Removed useless get queries on SMF's cache clean command.
* Called ob buffer with error depressed. (Easier to ignore an error than take a performance penalty accommodating it.)
* In sicache_clean removed append on cache dump and overwritten the transaction.
* Moved main purge statement on expired caches to beginning of transaction.
* Removed unused globals.
+ Added support to detect a malformed database in sicache_trans and delete it in sicache_destroy(). (This fixes a bug where the cache would quit working if it got malformed.)1.0.5 Unreleased
* Changed value table from text to blob.
+ Added support for ZLib compression of values. (Trying to decrease the SQLite file size.)
+ Added SQLite3 class which adds compatibility PHP 5 to 5.4 and SQLite 2 & 3. (Compression with UDF Binary encoding is preventing the mod right now from going any higher than 5.4)220.127.116.11 Released, use with caution.
+ Added SQLite3 class for older PHP versions that do not support it and to add support for SQLite 2 when SQLite 3 is not installed.
* Renamed mod from SQLite3 Cache to SQLite Cache.Info Pertaining to Releases &/or ChangeLog
One may notice above that allot of changes have the potential of data loss. Data loss however is no concern since the cache means for existence is temporary storage. If corruption of data occurs the database is purged and the system is returns to a brand new state waiting for input from SMF.In case you killed your forum
This mod is stable but by not meeting system requirements and/or not following the proper instructions included in this documentation can lead to a inoperable forum. If you end up with a inoperable forum then comment out the following line in index.php to get it back and running.
require_once($sourcedir . '/SQLite3cache.php');