Skip to content

SEC-2114: Spring Cache abstraction based UserCache implementation #23

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

Closed
wants to merge 1 commit into from

Conversation

mdeinum
Copy link
Contributor

@mdeinum mdeinum commented Jan 3, 2013

As of Spring 3.1 spring has its own cache abstraction. This commit adds cache
imlpementations based on that abstraction. Spring Security currently provides a direct EhCache based implementation.

JIRA: SEC-2114

I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.

As of Spring 3.1 spring has its own cache abstraction. This commit adds cache
imlpementations based on that abstraction. (reverse-merged from commit 7e15e15e9114f7a5ce27b2e324df28d5795051f0)
@rwinch
Copy link
Member

rwinch commented Jan 4, 2013

Marten,

Thanks for the contribution. I have merged your changes in and added a little bit of (opinionated) polish. Please let me know if you have any concerns with the changes or if you find them acceptable. You can find the full commit here and an outline of the changes with explanations below:

  • I removed any imports of EhCache from SpringCacheBasedAclCache. Most were just unused imports, but there were two try catch blocks for Eh Cache's CacheException that I removed
  • created getFromCache(Object key) to reuse some of the code in SpringCacheBasedAclCache
  • Removal of unused imports/code and minor JavaDoc changes
  • Change from using afterPropertiesSet() to using a constructor. This is change from some of the older code, but in general Spring Security now uses constructor injection for anything that is required and does not have a lot of dependencies. With this change I also removed the getCache() methods as this helps with encapsulation.

I will go ahead and close the pull request since it has been merged. Can you comment on SEC-2114 if you think the changes I made are ok or if you have concerns? If you have concerns and want to provide code feel free to open another pull request using the same JIRA for your commit comments. If you have no concerns, I will go ahead and mark SEC-2114 as resolved.

Thanks again for your contribution!
Rob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants