ruby on rails - Cached fragment never expires -


i have rails application managing public events. within view trying cache fragment expires every 8 hours. fragment caches never expires. looking @ site today fragment showing events 23rd june, last time manually flushed fragment cache.

i'm using following snippet renders list of event titles , dates:

- cache('sidebar-cache', :expires_in => 8.hour)     = render "shared/sidebar_festivals" 

i have tried following (24 hours instead of 8) same issue:

- cache "sidebar_cache", expires: 1.day.from_now(time.now.beginning_of_day)     = render "shared/sidebar_festivals" 

i have caching enabled in production.rb config file:

config.action_controller.perform_caching = true 

is there else need enable or fragment caching expire?

i'm using rails 4.2.1

any appreciated.

the issue having related timezones. time zone on server set eastern standard time whereas server located in london. rails app using utc. mismatch enough cause issue.

to set time on ubuntu server, i'm using here, run command root , follow prompts

dpkg-reconfigure tzdata 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -