• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 09:32:13 PM

News:

Check out the SMF Function DB!


Custom Cache

Started by SMF Customization Team, April 22, 2010, 10:55:52 PM

Previous topic - Next topic

SMF Customization Team

April 22, 2010, 10:55:52 PM Last Edit: April 22, 2010, 11:02:54 PM by vbgamer45
Link to Mod



Custom Cache

Link to Mod


Compatibility
For SMF 1.1.x

Introduction
Adds a custom cache system for SMF 1.1.x useful if you do not have APC,memcache on your server and still want to use caching


If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if your using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

Useful Links
Manual Installation Of Mods
How Do I Modify Files?

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog

o Initial Release

Arantor

Interesting backport.

I'm not entirely sure I'd rely on function_exists('fwrite'), I'd suggest using is_callable personally.
No good deed goes unpunished
All helpful urges should be circumvented

flapjack

every day I am a step closer to switching my forums to 2.0, and then - kaboom - you do this :)
good to know there's still some effort being put towards the 1.x! thanks lads

vbgamer45

Arantor using the same code as in SMF 2.0 just moved it to SMF 1.1.x

I would really love to just work on SMF 1.1.x and updating it if they would let me.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

vbgamer: Oh, I know. I just don't entirely agree with it. fwrite is present since PHP 4, and function_exists() in that context should simply be to deal with whether the function has been disabled by the host or not.

Except that IIRC, function_exists would still return true in that case...
No good deed goes unpunished
All helpful urges should be circumvented

vbgamer45

bah that sucks if it is disabled it should not exist oh well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

Except that no, in PHP, if it's disabled it should still exist.
No good deed goes unpunished
All helpful urges should be circumvented

vbgamer45

That's dumb for php to do that what does it return on disabled? Or do on disabled
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

function_exists() returns true while is_callable() should return false - at least that's what I've encountered in the past.

Trying to call the function results in an error.

Though I have yet to find a host dumb enough to disable that function.
No good deed goes unpunished
All helpful urges should be circumvented

vbgamer45

Yeah I have seen fsockopen disabled with hosts is_callable looks good never used that before.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

It is, however, slower than function_exists().
No good deed goes unpunished
All helpful urges should be circumvented

jexus1

Spanish Translation:

$txt['cache_writable_head'] = 'Alerta de rendimiento';
$txt['cache_writable'] = 'El directorio del cache no es escribible- esto afectara el rendimiento de tu foro.';

R.Bourne


Dannymh

I installed this but can not find where to turn it on?

any ideas?

vbgamer45

Admin -> Server Settings -> Caching
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Paracelsus

Quote from: vbgamer45 on June 23, 2010, 07:39:26 PM
Admin -> Server Settings -> Caching

And then you just choose level 1 (or level 2, etc)?

vbgamer45

I recommend level 2.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Paracelsus

Quote from: vbgamer45 on June 24, 2010, 11:27:13 AM
I recommend level 2.

I'll try level 2 then. Btw, what is the difference between a level 1 and 2? Is there a correlation between cache levels and server resources?

vbgamer45

Yeah Level 2 caches more stuff then level 1. I wouldn't do level 3 cause that would lead to stale information
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Cal O'Shaw

Hello,

Are there any guidelines as to when to use this?  Would it reduce CPU usage?  We've got 250K posts, 5400 topics, 860 users, a large search index, and we've had to limit Guest views (via MODs) to keep from going over our CPU allocation.

If there's a topic or post that covers this, could you please provide URL?

Grazie,

Cal

Advertisement: