Uploaded image for project: 'Spring Modules'
  1. Spring Modules
  2. MOD-255

Add a cache key object and factory that can be used with distributed caches.


    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CACHE
    • Labels:


      Currently springmodules cache only has 1 cache key object type and factory - HashCodeCacheKey.

      HashCodeCacheKey cannot be used when using distributed caches (eg. Ehcache in distributed mode), because it does not produce equal cache keys for equal MethodInvocation instances.

      To make my project work I wrote a cache key implementation that calculates hashCode only from methodInvocation.getMethodName() characters and that checks for equality (equals method) by checking equality of methodInvocation.getMethodName() and size and all members of Object[] returned by methodInvocation.getArguments().. I am relly new to caching, so I probably overlooked something important..

      I't would be nice if some expirienced people discuss this problem, and point out the important stuff regarding this problem.. after that its easy to write an implementation and add it to springmodules-cache.

      I am sure that springmodules-cache needs this improvement because distributed caches are used often.




            • Assignee:
              irbouho Omar Irbouh
              borut Borut Hadžialić
            • Votes:
              4 Vote for this issue
              4 Start watching this issue


              • Created: