XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.8.10 (Ingalls SR10)
    • Fix Version/s: None
    • Component/s: Cache, Core, Jedis Driver
    • Environment:
      Spring boot 1.5.7

      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:
            mp911de Mark Paluch
            Reporter:
            shakyamuni Sylvain
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: