Spring Data + Hibernate Query Caching not working

后端 未结 1 617
野的像风
野的像风 2021-02-09 05:34

I am trying but not succeeding to cache a query in Spring Data and Hibernate environmet with following dependencies :

1条回答
  •  失恋的感觉
    2021-02-09 05:44

    in jpa-context.xml was missing, adding which fixes the problem . The final jpa-context.xml is

    
    
    
        
        
    
        
          
             
              
            
          
        
    
    

    I also added resources/ehcache.xml.

    
    
    
    
    
    
    

    Which is referenced as ehcache.xml in resources/hibernate.cfg.xml.

    My CPU cache conf is

    prayag@prayag:~/hacker_/draobkcalb$ sudo dmidecode -t cache
    [sudo] password for prayag: 
    # dmidecode 2.11
    SMBIOS 2.5 present.
    
    Handle 0x000A, DMI type 7, 19 bytes
    Cache Information
        Socket Designation: Internal Cache
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 32 kB
        Maximum Size: 32 kB
        Supported SRAM Types:
            Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown
    
    Handle 0x000B, DMI type 7, 19 bytes
    Cache Information
        Socket Designation: External Cache
        Configuration: Enabled, Not Socketed, Level 2
        Operational Mode: Write Back
        Location: External
        Installed Size: 2048 kB
        Maximum Size: 2048 kB
        Supported SRAM Types:
            Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown
    

    0 讨论(0)
提交回复
热议问题