Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

How to create folders in redis's cache with spring?

$
0
0

I try to create folders in the redis cache of my project.I want something similar to what spring automatically do with spring session.

enter image description here

I have a lot of "DisplayItem" entries and I want to store them in a "displayitem" folder.

Here is my code :

@Cacheable(value = "displayItem", cacheManager = "longLifeCacheManager")public DisplayItem getDisplayItem(String displayItemCode) {    // Do a lot of things}@Cacheable(cacheManager = "mediumLifeCacheManager", value = "preferences:userPreferences", key = "#zenithName")public UserPreferences getUserPreferencesByZenithName(String zenithName) {    // Do something}

If I replace the value by "foldername:displayItem", it create a folder, but only for the keys (like I did for the preferences in the screenshot).I don't find how to store all the values in this same folder.

How can I do this ?


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>