Topic: Disable server side cache
Is there a way to disable server side caching temporarily for development?
Its time consuming to delete the server side cache after every change in code
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
FrontAccounting forum → FA Modifications → Disable server side cache
Is there a way to disable server side caching temporarily for development?
Its time consuming to delete the server side cache after every change in code
Have a cron job clear the tmp folder where the cache gets stored or disable caching in the apache server config.
Refer:
http://bertanguven.com/disable-caching-of-assets-in-apache
https://stackoverflow.com/questions/11532636/how-to-prevent-http-file-caching-in-apache-httpd-mamp
https://gist.github.com/JamieMason/3245483
Thanks apmuthu, that's a very good idea, i'll check those out tomorrow
Not for production
Whilst looking for something else I discovered there were already a few functions in FA that clear the cache
So added to renderer.php
If you want an icon:-
File: \themes\default\renderer.php
87: $dimg = "<img src='$path_to_root/themes/".user_theme()."/images/remove.png' style='width:14px;height:14px;border:0;vertical-align:middle;' alt='"._('Delete Cache')."'> ";
Then add:-
File: \themes\default\renderer.php
097: function delete_company_cache(){
098: flush_dir(company_path().'/js_cache');
099: }
100: echo "<a class='shortcut' href='?delete_company_cache=true'>$dimg" . _("Delete Cache") . "</a> \n";
101:
102: if(isset($_GET['delete_company_cache'])){
103: delete_company_cache();
104: }
It does not disable cache, just clears cache just for the company you are logged on to when you want from any page
@joe: can this be generically updated in the core?
I will have a look into this.
Joe
@joe, @apmuthu, This is already in core - click the 'Update' button in 'Preferences'
The above mod just lets you do it in one click and stays on current page instead of three clicks (->Preferences click Update) and changing page to Preferences, then at least one click to return to the page you were on.
If you're making changes to css it saves a few clicks and time everytime you update
@poncho1234: You are right - the company/#/js_cache/1/* vanishes.
FrontAccounting forum → FA Modifications → Disable server side cache
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 4 official extensions. Copyright © 2003–2009 PunBB.