Author Topic: [MOD] Cache System for 4images v1.7  (Read 76916 times)

0 Members and 1 Guest are viewing this topic.

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: [MOD] Cache System for 4images v1.7
« Reply #30 on: January 06, 2006, 02:37:46 AM »
Its not only the index.php its all files that you've edited recently, including cache_utils.php
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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Cache System for 4images v1.7
« Reply #31 on: January 06, 2006, 02:42:21 AM »
you mean i must open all my php files with the new editor, save it and upload it and then it works????

i have test it with the index,php, cache_utils.php and the lang/main.php

*EDIT*

i have open the index.php with the notepad and i have save the file in unicode....

this is the result...

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #32 on: February 08, 2006, 11:04:46 PM »
Hallo,

ich habe den Grund und die Funktion des Mods nicht verstanden, könnte mir das jemand erklären?

I not yet understood the reason and the function, could explain that someone to myself?

Gruß
michi-w.


Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Cache System for 4images v1.7
« Reply #33 on: February 09, 2006, 02:44:12 PM »
Hallo,

ich habe den Grund und die Funktion des Mods nicht verstanden, könnte mir das jemand erklären?

I not yet understood the reason and the function, could explain that someone to myself?

Gruß
michi-w.



Der Mod speichert relevante Sachen in einem Ordner deines Webspace. Diese Sachen werden eine Zeitlang gespeichert und wenn ein User innerhalb dieser Zeit deine Seite wieder besucht werden diese Dinge aus diesem Ordner geholt und nicht neu geladen. Das beschleunigt den Seitenaufbau.
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #34 on: February 09, 2006, 10:41:17 PM »
Danke!

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #35 on: March 18, 2006, 09:20:42 AM »
would it be possible to empty the cache directory automaticly ?
Like every 24 hrs ?
Otherwise i think this directory can grow to immense proportions if you don't empty it from ACP regulary.


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: [MOD] Cache System for 4images v1.7
« Reply #36 on: March 18, 2006, 02:11:50 PM »
will a script for cronjob satisfy you?
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 kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #37 on: March 18, 2006, 08:54:48 PM »
yes, that would be very nice !

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: [MOD] Cache System for 4images v1.7
« Reply #38 on: March 18, 2006, 09:54:05 PM »
Ok, here is a unix command that will remove any files that were modifyed more then 24 hours ago:[qcode] find /full/local/path/to/your/4images/folder/cache -maxdepth 1 -type f -daystart -ctime +1 -delete[/qcode] but before you do that, fist test it with this command:[qcode] find /full/local/path/to/your/4images/folder/cache -maxdepth 1 -type f -daystart -ctime +1 -print[/qcode]make sure it printed the correct files ;)
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 kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #39 on: March 19, 2006, 09:02:14 AM »
works perfect ! thx a lot !

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: [MOD] Cache System for 4images v1.7
« Reply #40 on: March 20, 2006, 09:37:58 AM »
the test with the -print worked fine, but when i use -delete i get an email with :

find: invalid predicate `-delete'


i suppose this means '-delete' is not valid ?

----------------------------------------------------------------------
find /home/*****/public_html/cache -maxdepth 1 -type f -daystart -ctime +1 -delete

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: [MOD] Cache System for 4images v1.7
« Reply #41 on: March 20, 2006, 02:27:11 PM »
Ok, then first try this:[qcode] find /full/local/path/to/your/4images/folder/cache -maxdepth 1 -type f -daystart -ctime +1 -exec rm {} \; -print[/qcode]

If that doesnt work, then try this:[qcode] find /full/local/path/to/your/4images/folder/cache -maxdepth 1 -type f -daystart -ctime +1 | xargs rm[/qcode]
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 ciprianmp

  • Newbie
  • *
  • Posts: 29
  • Php just rocks!
    • View Profile
    • My site
Re: [MOD] Cache System for 4images v1.7
« Reply #42 on: April 01, 2006, 01:17:30 PM »
I apologize for this stupid question, but this is the first time I use a cron job (in cpanel, right?).
Please tell me if this path would be correct (I have the 4images installed in gallery folder on my home directory):
Code: [Select]
/public_html/gallery/cache or it has to be like this?
Code: [Select]
full/local/public_html/gallery/cache Addition: Ok! I got it it should have been /home/cpanelusername/public_html/gallery/chache.

How do I actually see the -print results? Is there a page where I should check? Or it should be in the cpanel?
Addition: Well, I didn't notice there is an email address you can set to receive the output. Thanks!
Thank you V@no!
« Last Edit: April 03, 2006, 10:05:03 AM by ciprianmp »

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: [MOD] Cache System for 4images v1.7
« Reply #43 on: April 01, 2006, 06:29:42 PM »
There are two options:
1) you must have SSH access to your server and run that command from the shell.
2) use this command instead:[qcode] find /full/local/path/to/your/4images/folder/cache -maxdepth 1 -type f -daystart -ctime +1 -print > /tmp/cronoutput.txt[/qcode]
The /tmp/cronoutput.txt file must be exists before you execute the command. Once cronjob executed this command, it should save output into the /tmp/cronoutput.txt file.
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 ciprianmp

  • Newbie
  • *
  • Posts: 29
  • Php just rocks!
    • View Profile
    • My site
Re: [MOD] Cache System for 4images v1.7
« Reply #44 on: April 03, 2006, 10:01:55 AM »
I've tryed all your commands. Only the print ones worked for me. There is a documentation about cronjob cpanel UNIX commands syntaxes?
How do I use SSH on my site? Can you teach me please?