Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » Cache Write Error

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

Page: 1
Go to End
Author Topic: 311 Views
  • TVoge
    Avatar
    Community Member
    4 Posts

    Cache Write Error Link to this post

    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.

  • TVoge
    Avatar
    Community Member
    4 Posts

    Re: Cache Write Error Link to this post

    Bump. Any thoughts?

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Cache Write Error Link to this post

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

  • TVoge
    Avatar
    Community Member
    4 Posts

    Re: Cache Write Error Link to this post

    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?

  • TVoge
    Avatar
    Community Member
    4 Posts

    Re: Cache Write Error Link to this post

    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

    311 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.