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
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

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: 6
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: 8869
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: 6
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: 8869
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: 6
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

cron