-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add functionality to copy revision on activation. #43
Conversation
@arenoir thanks for this! It's an interesting use! one thought, I also wonder if this could be done entirely in nginx (more curiosity than anything) but as @lukemelia pointed out out-of-band this is pretty good for simple use cases. |
How about |
@lukemelia Should I add a boolean that explicitly enables this feature or is the presence of |
1971b21
to
f70fb2f
Compare
I changed the the key to The more I think about it the more I feel copyOnActivate should be default behavior. I mean whats the cost of one redis entry? |
@arenoir I don't think we need an extra boolean flag. I think we can base it on the presence of Also need to consider how/whether this works with people using redis plugin without revision-data plugin. |
@arenoir @lukemelia I'm ok with a default as well, and +1 for killing the boolean flag You probably considered this already but, If I read the current version of the implementation correctly, if |
@arenoir @lukemelia ping? |
7d4f946
to
3b47c95
Compare
@ghedamat, I removed the copyOnActivate boolean and rebased with master. So if |
@arenoir sorry, could you do another rebase and then we take it for the final review/merge? |
…to do the lookup as redis support is very limited. change copyToKey to activeContentSuffix add to readme update readme remove copyOnActivate boolean update tests
3b47c95
to
bf3ecac
Compare
@ghedamat, okay np I rebased with master... take a look. |
Nice work @arenoir. Thanks! |
Add functionality to copy revision on activation.
This pr adds a config option copyToKey. When defined the activate function copies the value of the specified version to the copyToKey in redis. This makes it possible to serve the index page from nginx.
Here is the corresponding nginx config.