You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is avoid having @ParameterValueKeyProvider as mandatory in the caching mechanism but instead using the simple hash-code based strategy as default strategy to generate cache key.
This strategy computes the key based on the hashes of all parameters used for method invocation, because is based on the common assumption that different method parameters requires different cache key.
So for example with following method
@ReadThroughSingleCache(namespace = "fooNamesapce")
public List getCountries(String query, String orderField, String orderType, Integer page, Integer max) throws Exception
the cache key is generated starting from something like this
Good point @kwon37xi.
I'll keep it in mind, still there can be some error/warning if key is too long or a way to enable some hash mechanism for all keys or keys with length greater than 250 byte.
The idea is avoid having @ParameterValueKeyProvider as mandatory in the caching mechanism but instead using the simple hash-code based strategy as default strategy to generate cache key.
This strategy computes the key based on the hashes of all parameters used for method invocation, because is based on the common assumption that different method parameters requires different cache key.
So for example with following method
@ReadThroughSingleCache(namespace = "fooNamesapce")
public List getCountries(String query, String orderField, String orderType, Integer page, Integer max) throws Exception
the cache key is generated starting from something like this
{namespace}{separator}{method qualified name}{separator}{parameter1Name}{separator}{paramter1hashcode}{separator}{parameter2name}{separator}{paramter2hashcode}....
Obviously if one/some of the parameters is null you just omit the parameter hascode.
The text was updated successfully, but these errors were encountered: