Purge cache quickly

Converters for phpBB2 MODs to phpBB3, MOD Tools, Automatic MOD installers, Tools for MOD Developers and programmers.

Purge cache quickly

Postby Imladris » 19 Dec 2007, 08:53

Are you tired of having to navigate through the acp everytime you have to purge the cache because you made some tiny alterations, well here is your solution, purche_cache.php. It will purge the cache for you automatically everytime you refresh it. But beware, follow the installation guide below thoroughly:

First of all I have to emphasize that this file only is tested sufficiently enough to conclude that it works, it hasn't been tested for security holes (though it is mostly phpbb3's own code i hope there are no security holes there.) However, it is on your own responsibility that you use this little fellow, I will gladly help you make him work though.

1. Upload the file into your adm folder in the root of your forum.
2. Do NOT tell anyone about this file.
3. Login to your forum as an admin and enter the acp.
4. Type in http://your-domain.com/path-to-your-for ... _cache.php in your browser.
5. You will be asked to reauthencate yourself, do so and press Proceed to the ACP, even though this might sound wrong.
6. Your will now be sent to purge_cache.php and your cache will be pursed. You can refresh this page as much as you want to, and if you want to reenter your acp you will have authenticate again.

Enjoy :)
Attachments
purge_cache.zip
(1023 Bytes) Downloaded 490 times
Imladris    
Crewman
Crewman
 
Posts: 6
Joined: 19 Dec 2007, 08:44
Favorite Team: Man Utd
Gender: Male
phpBB Knowledge: 7




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Purge cache quickly

Postby Handyman » 19 Dec 2007, 09:33

How is this better than the purge cache button on the front page of the ACP?
if you have to re-authenticate anyways, it's not any faster than the ACP button.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Purge cache quickly

Postby T50Webmaster » 19 Dec 2007, 09:34

how is this faster?
you only need to click a button in the ACP
pssst...I heard that!!!
Free and paid webhosting
Busy with life, just IM me, or PM me at 110mb.com/forum

Webmaster of a Northeast Wisconsin Boy Scout Troop Website, http://bsat50.info
T50Webmaster    
MOD Author
MOD Author
 
Posts: 629
Joined: 26 Mar 2007, 11:09
Location: Right where my Butt IS!!!
Favorite Team: phpbb
Gender: Male
phpBB Knowledge: 3

Re: Purge cache quickly

Postby Highway of Life » 19 Dec 2007, 15:24

It?s purge cache ACP main page, and purge template cache ACP > Styles > Templates.

This is far easier and better than uploading a file. :)
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Purge cache quickly

Postby Imladris » 19 Dec 2007, 17:00

It's faster in the way that when you have reauthenticated ONCE, you can refresh as much as you want to, thats faster than 3 clicks, if you are developing a mod where you are bugfixing or alike, yet, if you don't like it, I will not force you to download it.
Imladris    
Crewman
Crewman
 
Posts: 6
Joined: 19 Dec 2007, 08:44
Favorite Team: Man Utd
Gender: Male
phpBB Knowledge: 7

Re: Purge cache quickly

Postby Stoker » 19 Dec 2007, 17:24

Imladris wrote:It's faster in the way that when you have reauthenticated ONCE, you can refresh as much as you want to, thats faster than 3 clicks, if you are developing a mod where you are bugfixing or alike, yet, if you don't like it, I will not force you to download it.


The Danes Rocks :cool:

Does purge template do the same as refreshing template?
If not this would be nice to have included.
Stoker
Stoker    
Borg Drone
Borg Drone
 
Posts: 401
Joined: 24 Nov 2007, 11:05
Location: Denmark
Favorite Team: Highslide JS
Gender: Male
phpBB Knowledge: 4

Re: Purge cache quickly

Postby T50Webmaster » 19 Dec 2007, 17:47

I generally have 2 browsers open when i am editing files...

one for cahce and one for viewing,

I don't see why navigating to a page and clicking refresh everytime instead of purge cache is any faster
pssst...I heard that!!!
Free and paid webhosting
Busy with life, just IM me, or PM me at 110mb.com/forum

Webmaster of a Northeast Wisconsin Boy Scout Troop Website, http://bsat50.info
T50Webmaster    
MOD Author
MOD Author
 
Posts: 629
Joined: 26 Mar 2007, 11:09
Location: Right where my Butt IS!!!
Favorite Team: phpbb
Gender: Male
phpBB Knowledge: 3

Re: Purge cache quickly

Postby Highway of Life » 19 Dec 2007, 19:36

Then put $cache->purge(); in your MOD until you are finished testing, and go to ACP > Load > Recompile stale templates: yes.
This will eliminate your frustration. Making a script to do that for you doesn?t make much sense. :unsure:

3 clicks? If its just the script, its the same as living in the ACP, 1 click.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Purge cache quickly

Postby Imladris » 19 Dec 2007, 20:57

I'm very sorry to say it, but you talk to me like posting that script offended you, I'm rather sorry if it did, was not the intention, wanted to help out. Nonetheless I must say that it perhaps isn't the best way to greet a completely new user to your site... :hello:

Please do delete the topic if you deem it unfit or unworthy for this forum, again it was only a help :grin:
Imladris    
Crewman
Crewman
 
Posts: 6
Joined: 19 Dec 2007, 08:44
Favorite Team: Man Utd
Gender: Male
phpBB Knowledge: 7

Re: Purge cache quickly

Postby Highway of Life » 19 Dec 2007, 23:19

I should apologise, I didn?t mean to sound abrupt or offended at all. :)
And it indeed is not the correct way to greet new friends...
So first, welcome to STG. :wave: :D

We?re happy to have you join us. :hello:
My post was an attempt to to help you out there, as I know you created the script to try and make a process easier on you. We were pointing out that there are easier ways to go about clearing cache and/or configuring your board so that the cache-clearing process is not so difficult, which I take it was the motivation for the script and thus the topic as well.
This is, of course great to see, it?s how all good scripts come about.
However, we didn?t want to make it seem difficult for other users who came across this topic and believe they would have to use the script to easily clear the cache. :)

So to recap, you could configure your board to be a little easier on yourself for MODing and Templating.
If you login to your ACP and click on Load Settings, there is an option to change the recompile stale templates to on, this effectively allows the system to scan the template files for a changed filetime, (modified), if a file is modified, it is reloaded into the cache and the cache file replaced, so this means you won?t have to refresh your templates and/or themes when making changes.

For other duties, inputting $cache->purge(); temporarily could save you some time if you have to continuously refresh your MOD. Alternatively, there is the Purge Cache button on the main Admin Index page.

Apologies for the confusion, we?re just trying to help each-other out. :good:
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Next

Return to MOD, MODX - MOD Developer Tools and Converters

Who is online

Users browsing this forum: MSNbot Media and 2 guests

cron