Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

PHPFusion 7 Caching Mod

Asked Modified Viewed 4,337 times
A
abithecat
A
  • Junior Member, joined since
  • Contributed 29 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
asked
Junior Member

Hi!

Is it possible to enable some kind of caching for PHP Fusion? I couldn't find info about this anywhere. I mind my pages to become static HTML files updated daily, so php and SQL are not used with every page view.

Thanks!
0 replies

5 posts

A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

There was a mod called Hyper-Cache. Some people were discussing some etc etc about it. I don't know because I've never used it.

But, in order to Speed up your Website, you can use some manual techniques too...

By using GZIP Compression :

GZIP Compresses your webpage upto 70% so it reduces 70% time of loading ;)

Open your maincore.php and find for :
//ob_start("ob_gzhandler"); //Uncomment this line and comment the one below to enable output compression.

Just remove the Comment and GZIP will be enabled.

By using some Caching Techniques using htaccess file :

Read some Stupid Tricks here : http://perishablepress.com/press/2006...icks/#per7

What I am using in my .htaccess for caching is :

<ifmodule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType image/gif "access plus 518400 seconds"
ExpiresByType image/jpeg "access plus 518400 seconds"
ExpiresByType image/png "access plus 518400 seconds"
ExpiresByType text/css "access plus 518400 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
</ifmodule>

<ifmodule mod_headers.c>
# Cache specified files for 6 days
<filesmatch ".(ico|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=518400, public"
</filesmatch>
# Cache Javascripts for 5 days
<filesmatch ".(js)$">
Header set Cache-Control "max-age=432000, private"
</filesmatch>
</ifmodule>


and it is working Good for me.... :)
0 replies
A
abithecat
A
  • Junior Member, joined since
  • Contributed 29 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

Gzip is cool but it takes processor time to compress. I don't want to speed up my sites, I want to free some computer resources like processor time used. PHP and SQL spend much resources. If I am able to cache my pages as HTML, like caching in wordpress, it will be great.

What does this code in htaccess do, wen implemented?
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Okies !!!

The above code can be used to speed up by CACHING images files and JS and CSS files used...

But if you want to try Dynamic Caching, then you can Google it. There are some articles written on that.

Not Looked Thoroughly, but found similar to your point :
Google Search
PHP Caching to Speed up Dynamically Generated Sites
Nice thing for me... :) I will give it a try too in future... ;)
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Here is my current .htaccess settings minus a couple private ones:

# DEFAULT SETTINGS
##############################################
RewriteEngine On
RewriteCond %{HTTP_HOST} ^phpfusionmods.com$
RewriteRule (.*) http://www.phpfusionmods.com/$1 [R=301,L]

### DEFAULTS ###
ServerSignature Off
AddType video/x-flv .flv
AddType application/x-shockwave-flash .swf
AddType image/x-icon .ico
AddDefaultCharset iso-8859-1
DefaultLanguage en-US
SetEnv TZ America/Indianapolis
SetEnv SERVER_ADMIN netrix@phpfusionmods.com

SetOutputFilter DEFLATE



# HEADERS and CACHING
##############################################
#### CACHING ####
# YEAR
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico)$">
   Header set Cache-Control "max-age=2592000"
</FilesMatch>
# WEEK
<FilesMatch ".(js|css|pdf|swf)$">
   Header set Cache-Control "max-age=604800"
</FilesMatch>
# 10 minutes
<FilesMatch ".(html|htm|txt)$">
   Header set Cache-Control "max-age=600"
</FilesMatch>
# DONT CACHE
<FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
   Header unset Cache-Control
</FilesMatch>


and with a php.ini file you can enable zlib

zlib.output_compression = On


Works really good for me.
0 replies
A
abithecat
A
  • Junior Member, joined since
  • Contributed 29 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
answered
Junior Member

Thanks guys!

Dynamic caching is what I need, but I don't know if I will be able to implement it ...

That is why it would be good to be there a mod doing this, that only has to be installed

I am sure that anyone with big sites (more than 3-4 k visits per day) would really enjoy such a mod. My server just crashes with that many visits...
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
A
A
  • Junior Member, joined since
  • Contributed 29 posts on the community forums.
  • Started 14 threads in the forums
  • Started this discussions
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet