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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Cache Write Error


Reply


5 Posts   421 Views

Avatar
TVoge

Community Member, 4 Posts

2 May 2012 at 3:38am

Edited: 02/05/2012 3:39am

I've been searching the forums for something similar to this and just can't find it. I'm running the latest SS CMS and hosted with GoDaddy. Running it under windows. I've got the site working just fine and it all looks great. (site is: http://mn-amvets.org)

My problem is this. Very often, the first person to hit the site for the day gets a Cannot Write to Cache error. If they refresh the browser, then they get in just fine.

I've gone in and added this to my _config.php to try to turn off caching:

// turn off caching
if (Director::isDev()) SS_Cache::set_cache_lifetime('any', -1, 100);

I've also gone in to Cache.php and manually set the cache to -1:

static function set_cache_lifetime($for, $lifetime=-1, $priority=1)

But I still get the error on first entry. Has anyone run across this? Are there any thoughts on how to remedy it?

Thanks for any help anyone may have.

Avatar
TVoge

Community Member, 4 Posts

16 May 2012 at 1:41pm

Bump. Any thoughts?

Avatar
swaiba

Forum Moderator, 1799 Posts

16 May 2012 at 7:42pm

Are they getting an SS error? Is the site running in Dev mode?

Avatar
TVoge

Community Member, 4 Posts

17 May 2012 at 2:08am

Getting this:

[User Error] Uncaught Zend_Cache_Exception: cache_dir is not writable
GET /

Line 208 in D:\Hosting\6429096\html\sapphire\thirdparty\Zend\Cache.php

It is in DEV mode. Never gave that a thought. Should be running in production I take it?

Avatar
TVoge

Community Member, 4 Posts

17 May 2012 at 2:12am

Thank you swaiba. That was the ticket. Made it "live" and end-users don't get the error now. Something small and stupid bites me!

Appreciate your help.

Todd