Author Topic: something is wrong with cache  (Read 5556 times)

0 Members and 1 Guest are viewing this topic.

Offline arabcine

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
something is wrong with cache
« on: December 25, 2009, 10:29:00 AM »
hi all

when i enable cache by $cache_enable , then all php's and other will be same without refresh i put time 1800 and after 2 days nothing change
when i add images or change anything the page will show old and nothing change


Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: something is wrong with cache
« Reply #1 on: December 26, 2009, 04:05:06 AM »
Wen you enable cache, the pages will not refreshed each time when you uploads a new image. You can test whether cache is working for you or not by  enabling the cache print messages.

Change the below line in include/constants.php

Code: [Select]
define('PRINT_CACHE_MESSAGES', 0);

to
Code: [Select]
define('PRINT_CACHE_MESSAGES', 1);


but make sure you turn it off also after your testing  :D


Also, you need to clear all the caches periodically by using cache plugin in your ACP.


Offline arabcine

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: something is wrong with cache
« Reply #2 on: December 26, 2009, 01:12:31 PM »
thanks for your replay.


i set it on , then i got message used etc, but i have problem when i add new images it's not show or you can say it's show old pages ....

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: something is wrong with cache
« Reply #3 on: December 26, 2009, 05:16:19 PM »
Thats the way cache works.. you need to delete the old cache files or need to wait for the cache file to be expired, after that the new images will be shown..


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: something is wrong with cache
« Reply #4 on: December 26, 2009, 05:23:46 PM »
add this into config.php:
$cache_lifetime        60// 1 minute

And see if anything changes.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline arabcine

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: something is wrong with cache
« Reply #5 on: December 26, 2009, 05:39:44 PM »
can i make cache for images only if i change the name of images will change ? without php files or index etc