Jump to content

[Resolved] Cache not working - Or is it ?


ChrisColeman

Recommended Posts

No, that is not normal. Even when caching* has been disabled, Smarty will save compiled templates in the /cache/skin/ folder. With caching disabled, Smarty should not actually use those compiled templates (so that changes to the templates are immediately resolved).

*CubeCart can use any one of several caching methods that may be installed onto the server. Some methods may not be file-based.

Link to comment
Share on other sites

That seems a bit strange - If SMARTY is serving the pages then they should be cached ?

Globals caching is set as 'file' ?

When I run in debug mode I see - 'Always Disabled in ACP', although that might be because I'm in debug mode.

Anyway is there something I can do to determine the source of the problem?

Chris.

Link to comment
Share on other sites

Looking at the file /controllers/controller.admin.pre_session.inc.php, there are setup statements for Smarty that identify where Smarty will perform it's three steps: compiling, configuring, and caching. I'm not sure how the Smarty code interfaces with the Cache code, but my experiences suggests it does.

Smarty does not "serve" pages. That's the job of the web server. PHP outputs whatever output is was programmed to output, and the web server is there to catch it from PHP and send it off.

Smarty generates a string that is the final rendered construction of data populating a template, and this final construction gets assigned to a PHP variable.

In admin, many of the tasks manipulate and change data, so there is the real desire not to cache any of it.

In the setup statements, there is also the statement that mutes expected errors. If Smarty can't cache because the permissions of the cache folder is denying access to it, that might be considered an expected error.

On the other hand, my experiences suggest that getting Smarty's errors logged is not always routinely accomplished.

Link to comment
Share on other sites

Hi,

     well thanks, it was indeed a permissions problem on the server. I had to write a little PHP script to change the permissions . CPANEL would not allow the permissions change, probably because I uploaded the site from a development server.

By the way forgive my terminology in previous post - I understand that SMARTY does not serve files.

Thanks Chris.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...