We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sylvain opened DATAREDIS-797 and commented
Hi
That's my first use of jira. Hope to not disturb...
I Have got a problem when i try to use @Cacheable data redis
@Cacheable
I try some tuto with the simple Person.class
Person.class
PersonRepository extends JpaRepository<Person, String> @Cacheable(value = "persons", keyGenerator = "customKeyGenerator") @GetMapping(value = "/persons") public List<Person> findAll() { LOGGER.info("*** FINDALL"); return repo.findAll(); }
It's working : when i shoot the url 2 times, this log is displaying only once! Perfect!
Now i try the same with a Feature class (geoJson context)
@Cacheable(value = "features", keyGenerator = "customKeyGenerator") @GetMapping("/features/findAll") FeatureCollection findAllFeature(@RequestParam("key") String key) { LOGGER.info("COUCOU"); return repo.findAll(key); }
I insert in Redis with : { hashOps.put(key, f.getId(), f);}}
When i shoot the URL2 times, the log display twice... bad luck
P.S : i put some log in my KeyGenerator, and those logs are only displaying for Person tests... Don t know why ...
KeyGenerator
Can you help to find out what am i doing wrong ?
Thanks
Affects: 1.8.10 (Ingalls SR10)
The text was updated successfully, but these errors were encountered:
Mark Paluch commented
Using @Cacheable on controller methods can come with unexpected side-effects. Closing this ticket as we cannot reproduce it and it's outdated
Sorry, something went wrong.
mp911de
No branches or pull requests
Sylvain opened DATAREDIS-797 and commented
Hi
That's my first use of jira. Hope to not disturb...
I Have got a problem when i try to use
@Cacheable
data redisI try some tuto with the simple
Person.class
It's working : when i shoot the url 2 times, this log is displaying only once! Perfect!
Now i try the same with a Feature class (geoJson context)
I insert in Redis with : { hashOps.put(key, f.getId(), f);}}
When i shoot the URL2 times, the log display twice... bad luck
P.S : i put some log in my
KeyGenerator
, and those logs are only displaying for Person tests...Don t know why ...
Can you help to find out what am i doing wrong ?
Thanks
Affects: 1.8.10 (Ingalls SR10)
The text was updated successfully, but these errors were encountered: