Details

      Description

      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

      I try some tuto with the simple 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 ...

      Can you help to find out what am i doing wrong ?

      Thanks

        Attachments

          Activity

            People

            • Assignee:
              cstrobl Christoph Strobl
              Reporter:
              shakyamuni Sylvain
              Last updater:
              Christoph Strobl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: