Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Odd caching problem


Go to End


6 Posts   924 Views

Avatar
JoshuaLewis

Community Member, 81 Posts

9 March 2015 at 9:57pm

Edited: 09/03/2015 9:58pm

I've uploaded theme and mysite updates (build on windows local server) to a staging copy of my site on a shared server at Zee-Way.com and neither ?flush=1 nor ?flush=all show any changes on the front end. No errors are shown even when the environment is set to 'dev'. Manually deleting the cache shows no effect either.

Changes to site content and CSS propagate through fine, only the markup seems stuck. I've edited the contents of theme files through FTP and the cPanel with no apparent result after a flush. I even renamed the theme directory so that it couldn't be found and all the markup still came through the front-end after a ?flush=all, the stylesheet and JS file links where just broken.

If I change mysite/config/_config.yml to point to the renamed theme and run a ?flush then everything updates as expected. Editing the theme files and flushing shows the updates right away. Changing the theme directory name and config file back to the original name revert the front end back to that same stuck version.

Where should I try looking to figure out why ?flush isn't producing any result under the original theme name but does under a new one?

Avatar
wmk

Community Member, 87 Posts

9 March 2015 at 10:07pm

Depends on your caching system. Do you have e.g. memcache enabled? Or staticpublisher? Please provide more information about your installation (ss version, possbile modules that may affect caching, do you use partial cache...)

Avatar
JoshuaLewis

Community Member, 81 Posts

9 March 2015 at 10:40pm

Edited: 09/03/2015 10:41pm

SS 3.1.8, GridField Bulk Editing Tools, Silvergraph, Foundation Forms, GridField Extensions, UserForms, BetterButtons, EventCalendar.

No StaticPublisher. I can't pull a full PHPInfo() with this host but

if(class_exists('Memcache')){}
indicates that isn't available.

I re-zipped the theme on my local machine and then uploaded and unzipped it through cPanel (under the original name). After that, flush updated to reflect changes which had been made a few minutes earlier to the copy on the server but not test changes to the freshly uploaded version which overwrote them. I'm currently uploading the theme as loose files through FTP but it's moving very slowly.

Thanks for taking the time to help.

Avatar
JoshuaLewis

Community Member, 81 Posts

10 March 2015 at 12:11am

And now flush works.

I stopped uploading the loose theme files by FTP because it had taken nearly two hours to get through barely a third of them (should have taken 2 minutes, literally). Re-uploaded a zipped version and unpacked it in the cPanel file manager. Then changed the site config to point to the newly uploaded copy under its original name, flushed the front end and it all shows up correctly. I modified a template file and the change propagated right through to the front-end without problem.

I have no clue what's going on at this point.

Avatar
wmk

Community Member, 87 Posts

10 March 2015 at 12:23am

A decent IDE like phpstorm can also upload changed files with ftp, which would make things easier. Maybe your editor / IDE can help you with this?

Avatar
JoshuaLewis

Community Member, 81 Posts

10 March 2015 at 8:21am

FTP for this host has been slow the past week or so regardless of what client or user I've used to connect. It's like things hang up on the handshake stage.

I'm still stumped about the caching problem however, especially since I don't even know how to replicate it.