Skip to content

Never Expire Cache #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Version History
* All Version bumps are required to update this file as well!!
----

* 0.5.0 - Auto-inject Client Helper into Views/Controllers. Pass through to Snippet tag entire set of HTML attributes. Implement new namespacing and support Bundler.require.
* 0.5.1 - Set Webpage feed cache to never expire
* 0.5.0 - Auto-inject Client Helper into Views/Controllers. Add 10s race condition resolution to Rails cache fetch. Pass through to Snippet tag entire set of HTML attributes. Implement new namespacing and support Bundler.require.
2 changes: 1 addition & 1 deletion lib/cortex/snippets/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def cortex_client

def current_webpage(request)
if defined?(Rails)
Rails.cache.fetch("webpages/#{request_url(request)}", expires_in: 30.minutes, race_condition_ttl: 10) do
Rails.cache.fetch("webpages/#{request_url(request)}", expires_in: 0, race_condition_ttl: 10) do
cortex_client.webpages.get_feed(request_url(request)).contents
end
else
Expand Down
2 changes: 1 addition & 1 deletion lib/cortex/snippets/client/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Cortex
module Snippets
module Client
VERSION = '0.5.0'
VERSION = '0.5.1'
end
end
end