SlideShare a Scribd company logo
By Anirban Sen Chowdhary
.
.
So, let us consider we have configured a web service with the
Mule cache scope in following way:-
Corresponding Mule flow will be :-
Now we will configure our cachingStrategy with
NonPersistentManagedObjectStore as follows:-
<ee:object-store-caching-strategy name="cachingStrategy"
doc:name="cachingStrategy">
<managed-store storeName="myNonPersistentManagedObjectStore"
maxEntries="-1" entryTTL="20000" expirationInterval="5000"/>
</ee:object-store-caching-strategy>
So it is very simple right ?
In next step we will be running and testing the
application. This web servicewill intereact with database
retrieve a row from the database and show the row value
in the SOAP response.
Here how we will test the web service :-
You can see that we have used SoapUI to test the web service. Now
when we hit the service, you can see in the SOAP request, it takes id
as input and then fetches all the data from the database for that id.
Now, what we will do is manually deleting the entire row
from the database. In my case, I have used sql server
and deleted the row from the table using a SQL query:-
With this in place, if we again hit the service, we will get
the same response as we got earlier:-
You can see that, though the entire row is deleted from
the database table, it’s still showing the response, which
means it is fetching the response from cache and not
hitting the actual database
Now, let’s create a Mule flow that will invalidate and
clear all the Cache
So, with following flow we can clear all the Cache that
has been used:-
Corresponding Mule config will be :-
<flow name="cacheinvalidate" doc:name="cacheinvalidate">
<http:inbound-endpoint exchange-pattern="request-response"
address="http://localhost:8083/invalidate" doc:name="HTTP"/>
<object-to-string-transformer doc:name="Object to String"/>
<ee:invalidate-cache cachingStrategy-ref="cachingStrategy"/>
<set-payload value="All cache invalidated" doc:name="Set
Payload"/>
</flow>
As we can see the above flow will use ee:invalidate-cache to
clear all the cache.
Now if we hit the url:- http://localhost:8083/invalidate
following way :-
So, we can hit the web service again to test the output.
So, now if we hit service again after the cache has been
invalidated, we will find the following result
As you can see, it clearly shows no records are there in the
database, which means the cache has invalidated successfully and
the service is actually hitting the database.
It’s simple example.. isn’t it … we don’t need to
configure any complex configuration for the cache as
compared to the configuration we need to do in case of
using cache with EHCache.
Hope you enjoyed the simple usage of Cache with
NonPersistentManagedObjectStore and the way of
invalidating it.
Caching and invalidating with managed store

More Related Content

What's hot (18)

PPTX
Filtering jms messages with mule
Anirban Sen Chowdhary
 
PPTX
Quartz component in mule demo
Sudha Ch
 
PPTX
Mulesoft vm transport reference
kumar gaurav
 
PPTX
Creating dynamic json in Mule
F K
 
PPTX
Mule with composite source
Anirban Sen Chowdhary
 
PPTX
Mule soap
Khasim Saheb
 
PPTX
Groovy example in mule
Mohammed246
 
PPTX
Caching and invalidating with managed store
irfan1008
 
PPTX
Encrypting/Decrypting mule
Anirban Sen Chowdhary
 
PPTX
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
PPTX
Map in Mule
Anirban Sen Chowdhary
 
PPTX
Until successful component in mule
javeed_mhd
 
PPTX
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
PPT
Anypoint connectorfor ibm as 400
himajareddys
 
PPTX
Compress and decompress
Son Nguyen
 
PPTX
Mule with stored procedure
mdfkhan625
 
PPTX
Mule esb :Data Weave
AnilKumar Etagowni
 
PPTX
Mule requesterdemo
Anirban Sen Chowdhary
 
Filtering jms messages with mule
Anirban Sen Chowdhary
 
Quartz component in mule demo
Sudha Ch
 
Mulesoft vm transport reference
kumar gaurav
 
Creating dynamic json in Mule
F K
 
Mule with composite source
Anirban Sen Chowdhary
 
Mule soap
Khasim Saheb
 
Groovy example in mule
Mohammed246
 
Caching and invalidating with managed store
irfan1008
 
Encrypting/Decrypting mule
Anirban Sen Chowdhary
 
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Until successful component in mule
javeed_mhd
 
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
Anypoint connectorfor ibm as 400
himajareddys
 
Compress and decompress
Son Nguyen
 
Mule with stored procedure
mdfkhan625
 
Mule esb :Data Weave
AnilKumar Etagowni
 
Mule requesterdemo
Anirban Sen Chowdhary
 

Similar to Caching and invalidating with managed store (20)

PPTX
Caching invalidating with managed store
AbdulImrankhan7
 
PPTX
Caching invalidating with managed store
Praneethchampion
 
PPTX
Caching and invalidating with managed store
mdfkhan625
 
PPTX
Caching and invalidating with managed store
Khasim Saheb
 
PPTX
Caching and invalidating with managed store
F K
 
PPTX
Caching and invalidating with managed store
Mohammed246
 
PPTX
Caching and invalidating with managed store
javeed_mhd
 
PPTX
Caching and invalidating with managed store
Sunil Komarapu
 
PPTX
Caching and invalidating with managed store
Sunil Komarapu
 
PPTX
Caching and invalidating with managed store
Hasan Syed
 
PPTX
Caching & validating
Son Nguyen
 
PPTX
Caching strategies in MuleSoft
NeerajKumar1965
 
PPTX
Cache community edition
AbdulImrankhan7
 
PPTX
Community edition Cache
Praneethchampion
 
PPTX
Cache for community edition
mdfkhan625
 
PPTX
Cache for community edition
F K
 
PPTX
Cache for community edition
Khasim Saheb
 
PPTX
Cache for community edition
Mohammed246
 
PPTX
Cache for community edition
javeed_mhd
 
PPTX
Cache for community edition
irfan1008
 
Caching invalidating with managed store
AbdulImrankhan7
 
Caching invalidating with managed store
Praneethchampion
 
Caching and invalidating with managed store
mdfkhan625
 
Caching and invalidating with managed store
Khasim Saheb
 
Caching and invalidating with managed store
F K
 
Caching and invalidating with managed store
Mohammed246
 
Caching and invalidating with managed store
javeed_mhd
 
Caching and invalidating with managed store
Sunil Komarapu
 
Caching and invalidating with managed store
Sunil Komarapu
 
Caching and invalidating with managed store
Hasan Syed
 
Caching & validating
Son Nguyen
 
Caching strategies in MuleSoft
NeerajKumar1965
 
Cache community edition
AbdulImrankhan7
 
Community edition Cache
Praneethchampion
 
Cache for community edition
mdfkhan625
 
Cache for community edition
F K
 
Cache for community edition
Khasim Saheb
 
Cache for community edition
Mohammed246
 
Cache for community edition
javeed_mhd
 
Cache for community edition
irfan1008
 
Ad

More from Anirban Sen Chowdhary (20)

PPTX
Change the game with Game changer
Anirban Sen Chowdhary
 
PPTX
Ring central desktop app overview
Anirban Sen Chowdhary
 
PPTX
Overview in ringcentral digital line
Anirban Sen Chowdhary
 
PPTX
Some basics with ring central
Anirban Sen Chowdhary
 
PPTX
Ring central and python
Anirban Sen Chowdhary
 
PPTX
RingCentral application development overview
Anirban Sen Chowdhary
 
PPTX
Cloze connect ringcentral
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors part 4
Anirban Sen Chowdhary
 
PPTX
Setting up your ring central sandbox in steps
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors: part 2
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors
Anirban Sen Chowdhary
 
PPTX
Call recording overview ring central
Anirban Sen Chowdhary
 
PPTX
Ring central engaging with amazon alexa
Anirban Sen Chowdhary
 
PPTX
How ring central sdk changing the game
Anirban Sen Chowdhary
 
PPTX
When ring central connect salesforce
Anirban Sen Chowdhary
 
PPTX
Mule 4 connecting ring central
Anirban Sen Chowdhary
 
PPTX
Ring central sdk
Anirban Sen Chowdhary
 
PPTX
Ring central with okta
Anirban Sen Chowdhary
 
PPTX
Ring central connecting salesforce overview
Anirban Sen Chowdhary
 
PPTX
Ring central call logs overview (part 2)
Anirban Sen Chowdhary
 
Change the game with Game changer
Anirban Sen Chowdhary
 
Ring central desktop app overview
Anirban Sen Chowdhary
 
Overview in ringcentral digital line
Anirban Sen Chowdhary
 
Some basics with ring central
Anirban Sen Chowdhary
 
Ring central and python
Anirban Sen Chowdhary
 
RingCentral application development overview
Anirban Sen Chowdhary
 
Cloze connect ringcentral
Anirban Sen Chowdhary
 
Overview on ring central errors part 4
Anirban Sen Chowdhary
 
Setting up your ring central sandbox in steps
Anirban Sen Chowdhary
 
Overview on ring central errors: part 2
Anirban Sen Chowdhary
 
Overview on ring central errors
Anirban Sen Chowdhary
 
Call recording overview ring central
Anirban Sen Chowdhary
 
Ring central engaging with amazon alexa
Anirban Sen Chowdhary
 
How ring central sdk changing the game
Anirban Sen Chowdhary
 
When ring central connect salesforce
Anirban Sen Chowdhary
 
Mule 4 connecting ring central
Anirban Sen Chowdhary
 
Ring central sdk
Anirban Sen Chowdhary
 
Ring central with okta
Anirban Sen Chowdhary
 
Ring central connecting salesforce overview
Anirban Sen Chowdhary
 
Ring central call logs overview (part 2)
Anirban Sen Chowdhary
 
Ad

Recently uploaded (20)

PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 

Caching and invalidating with managed store

  • 1. By Anirban Sen Chowdhary
  • 2. .
  • 3. .
  • 4. So, let us consider we have configured a web service with the Mule cache scope in following way:-
  • 6. Now we will configure our cachingStrategy with NonPersistentManagedObjectStore as follows:- <ee:object-store-caching-strategy name="cachingStrategy" doc:name="cachingStrategy"> <managed-store storeName="myNonPersistentManagedObjectStore" maxEntries="-1" entryTTL="20000" expirationInterval="5000"/> </ee:object-store-caching-strategy> So it is very simple right ?
  • 7. In next step we will be running and testing the application. This web servicewill intereact with database retrieve a row from the database and show the row value in the SOAP response.
  • 8. Here how we will test the web service :- You can see that we have used SoapUI to test the web service. Now when we hit the service, you can see in the SOAP request, it takes id as input and then fetches all the data from the database for that id.
  • 9. Now, what we will do is manually deleting the entire row from the database. In my case, I have used sql server and deleted the row from the table using a SQL query:-
  • 10. With this in place, if we again hit the service, we will get the same response as we got earlier:-
  • 11. You can see that, though the entire row is deleted from the database table, it’s still showing the response, which means it is fetching the response from cache and not hitting the actual database
  • 12. Now, let’s create a Mule flow that will invalidate and clear all the Cache So, with following flow we can clear all the Cache that has been used:-
  • 13. Corresponding Mule config will be :- <flow name="cacheinvalidate" doc:name="cacheinvalidate"> <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8083/invalidate" doc:name="HTTP"/> <object-to-string-transformer doc:name="Object to String"/> <ee:invalidate-cache cachingStrategy-ref="cachingStrategy"/> <set-payload value="All cache invalidated" doc:name="Set Payload"/> </flow> As we can see the above flow will use ee:invalidate-cache to clear all the cache.
  • 14. Now if we hit the url:- http://localhost:8083/invalidate following way :-
  • 15. So, we can hit the web service again to test the output. So, now if we hit service again after the cache has been invalidated, we will find the following result As you can see, it clearly shows no records are there in the database, which means the cache has invalidated successfully and the service is actually hitting the database.
  • 16. It’s simple example.. isn’t it … we don’t need to configure any complex configuration for the cache as compared to the configuration we need to do in case of using cache with EHCache.
  • 17. Hope you enjoyed the simple usage of Cache with NonPersistentManagedObjectStore and the way of invalidating it.