I try to create folders in the redis cache of my project.I want something similar to what spring automatically do with spring session.
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 ?