java - is it posible to add new value to ehcache in spring? -


I am trying to use eHatch in my Java project, it is new to me.

I am now using the eHatch to retrieve the area list, and adding new project to my project, at that time I am using @Triggers, once the cache is cleaned and then it Reload.

ex: I have to withdraw 10 areas and use AHsk, and I add another area, at that time I clear the cache and reload it.

There is no other alternative to avoiding reloading in the data cache.

My code: @Cacheable (cache name = "retrieve") public list & lt; AreaBO & gt; Recover Ares () {// some code here} Remove the "Triggers" (cache name = "reciprocated", remove all = true) Public long addArea (Aaronon Aryabo) user s serviceexation {// some code here}

It seems that you are using annotation from ahap. If you want to switch to the caching annotation provided since version 3.1, then your code will be:

  @Cacheable (value = "retrieveAreas") public list & lt; AreaBO & gt; Retrieve Ares () {// some code here} @CachePut (Value = "RecoveryArease") Public linking long ago (Aaronon Aryabao) user s serviceexation {// some code here}   < p> see the difference @cpppot is in annotation which adds the return value of the method to the specified cache I do not know about a related annotation in eACHCHECH   

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -