OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Disable cache for developing

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Disable cache for developing

Postby ronniebrito » Tue Jul 30, 2013 10:27 am

Hi there,

How to disable smarty caching for OJS developing/testing?
ronniebrito
 
Posts: 7
Joined: Fri Mar 08, 2013 9:48 am
Location: Brasília - Brasil

Re: Disable cache for developing

Postby asmecher » Tue Jul 30, 2013 10:36 am

Hi ronniebrito,

If the file permissions in cache/t_compile are correct, Smarty will automatically recompile templates when they're modified. No need to disable caching.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Disable cache for developing

Postby ronniebrito » Thu Aug 01, 2013 5:24 am

Thanks for the answer Alec,

but its not working...
the files are already writable by the webserver, and even if giving chmod 777 on the directory it does not update when .tpl file is changed.
it updates just after deleting de file on cache directory.

-rwxrwxrwx 1 www-data www-data 3349 2013-08-01 09:53 %%D4^D48^D48FF8C7%%peerReviewGraphForm.tpl.php
ronniebrito
 
Posts: 7
Joined: Fri Mar 08, 2013 9:48 am
Location: Brasília - Brasil

Re: Disable cache for developing

Postby asmecher » Thu Aug 01, 2013 7:38 am

Hi ronniebrito,

I still think this is an administration issue rather than a need to disable caching; Smarty uses file modification times to determine whether the cached version is out of date before it's used. See lib/pkp/lib/smarty/Smarty.class.php in the _is_compiled function. If you do want to disable caching entirely, you can hack that function to return false.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: Disable cache for developing

Postby ronniebrito » Fri Aug 09, 2013 7:45 am

I suppose there might be something wrong with timestamp management in my system.
Hacking the is_compiled function worked nice.
Thank you
ronniebrito
 
Posts: 7
Joined: Fri Mar 08, 2013 9:48 am
Location: Brasília - Brasil


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest