[RC2] phpBB2 Native SQL Caching (1.1.0)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

[RC2] phpBB2 Native SQL Caching (1.1.0)

Post by tunafish »

phpBB2 Native SQL Caching
Current Version 1.1.0

_______________________________________________________

Note
As the original author of this mod has been banned i have taken over this project and continued development.

_______________________________________________________

Contributions
Any contributions made by third partys and posted in this thread will get a link in think section of the post, i will check this thread daily.

_______________________________________________________

About
With this modification installed you will be able to cache sql queries for faster page generation times and less database usage, the following can be done with this method.

_______________________________________________________

What is SQL caching?
This mod will add an additional parameter to the sql_query function of the sql_db object, this parameter will tell the query to use php files to store queried data for the specified about of time (3hrs by default, you may use a config var to store an alt number) in a php file as a serialized string, this will improve the performance of your forum as done in phpBB3 by reducing the load put onto the mysql service.

_______________________________________________________

How to cache a query!
To cache your SQL query you simply add a cache handle to your sql_query function.
This is your standard query

Code: Select all

$db->sql_query($sql)
This is your standard query (transaction applied)

Code: Select all

$db->sql_query($sql, true)
This is your cached sql query

Code: Select all

$db->sql_query($sql, true, 'cache_name')
As you can see, its as simple as adding that extra parameter to the function, as this mod develops i will also provide a toolkit to cache the most important queries in phpBB.

_______________________________________________________

Config keys
sql_cache_dir: Custom caching directory
sql_cache_expire: Custom caching time (in seconds) default: 3hrs

_______________________________________________________

Download Mirrors
[1.1.0] http://www.gotbase.org/mod_sql_caching_110.zip (Thanks A.I. BOT)
[1.1.0] http://www.extremephpbb.com/mods/mod_sq ... ng_110.zip (Thanks danb00)
[1.0.0] http://gotbase.org/mod_sql_caching_100.zip (Thanks A.I. BOT)

_______________________________________________________

Change Log
Changes for each version of this mod
  • Version 0.1.0
    • # Stable Release
    Version 1.0.0
    • # Reviewed and submitted to MOD-DB, Forgot about the transaction param, readded.
    Version 1.1.0
    • # Created caching class
      # Cleaned up the code a little
      # Added optional config directives
      # MOD Takeover by tunafish
Last edited by tunafish on Mon Jul 03, 2006 7:33 am, edited 6 times in total.
phpBB Problems? PM ME :)
User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken »

good luck with your project.

however make sure you mirror the download url !

Rfn
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here
User avatar
NGLeader
Registered User
Posts: 88
Joined: Fri Mar 14, 2003 12:04 am
Location: New York, N.Y.
Contact:

Cache Manager

Post by NGLeader »

Hi, tunafish.

See my post in this thread, about making this as a phpbb cache manager.
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Glad to see good MODs being continued!
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

Post by tunafish »

When i can i will write a cache class to also cache templates.
phpBB Problems? PM ME :)
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Like eXtreme Styles?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

Post by tunafish »

Yep, but a little less advanced, it will just put template data into a string instead of making actual php files like XS.
phpBB Problems? PM ME :)
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

Post by tunafish »

New version is now available.
phpBB Problems? PM ME :)
User avatar
PastisD
Registered User
Posts: 4
Joined: Sat Jan 31, 2004 6:59 pm

Post by PastisD »

Config keys
sql_cache_dir: Custom caching directory
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

Post by tunafish »

if the config key is not said in the /cache directory.
phpBB Problems? PM ME :)
danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

This mod is usefull very usefull. Just wondering does it cache the phpBB version updater?
phpBBModded.com - Modding phpBB
tunafish
Registered User
Posts: 152
Joined: Sat Jul 23, 2005 1:29 pm

Post by tunafish »

No it does not.
phpBB Problems? PM ME :)
EzerchE
Registered User
Posts: 102
Joined: Fri Apr 08, 2005 11:22 pm

Post by EzerchE »

Post Reply

Return to “[2.0.x] MODs in Development”