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
Fix #2885 Landing page always shows sign up button for private marketplaces #2944
Conversation
ebd75c2
to
ebe43b2
Compare
Uh, tests are failing. I'll fix them |
def fetch_cached_content(community_id, version, digest) | ||
Rails.cache.read("clp/#{community_id}/#{version}/#{digest}") | ||
def fetch_cached_content(community_id, version, digest, cta) | ||
Rails.cache.read("clp/#{community_id}/#{version}/#{digest}/#{cta}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you need cta
in the content cache keys. The content is different, so the digest will be different. As long as you have the meta based on the correct cta
, it should be fine.
end | ||
|
||
def cache_content!(community_id, version, locale, content, cache_time) | ||
def cache_content!(community_id, version, locale, content, cache_time, cta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
def write_cached_content!(community_id, version, content, digest, cache_time) | ||
Rails.cache.write("clp/#{community_id}/#{version}/#{digest}", content, expires_in: cache_time) | ||
def write_cached_content!(community_id, version, content, digest, cache_time, cta) | ||
Rails.cache.write("clp/#{community_id}/#{version}/#{digest}/#{cta}", content, expires_in: cache_time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
ebe43b2
to
a4eb266
Compare
end | ||
|
||
## Internal, use cache_content! instead | ||
def write_cached_content!(community_id, version, content, digest, cache_time) | ||
Rails.cache.write("clp/#{community_id}/#{version}/#{digest}", content, expires_in: cache_time) | ||
Rails.cache.write("clp/#{community_id}/#{version}/#{digest}/", content, expires_in: cache_time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runaway trailing /
a4eb266
to
b59789c
Compare
b59789c
to
8d48c92
Compare
Problem: See #2885 for detailed description about the issue
Solution:
cta
(which can be eithersignup
orsearch
) for private marketplace.