SlideShare a Scribd company logo
Caching and invalidating
with managed-store
Today’s topic we will be discussing the
NonPersistentManagedObjectStore and we
will not be doing any complex Caching
configuration with spring beans in our Mule
config.
.
How ??? I will show you how
.
So, let us consider we have configured a web service with
the Mule cache scope in following way:-
<flow name="ServiceFlow" doc:name="ServiceFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost"
port="8082" path="mainData" doc:name="HTTP" />
<object-to-string-transformer doc:name="Object to String"/>
<ee:cache doc:name="Cache" cachingStrategy-ref="cachingStrategy" >
<vm:outbound-endpoint exchange-pattern="request-response" path="Flow1-WT-Main"
doc:name="VM"/>
<object-to-string-transformer doc:name="Object to String"/>
</ee:cache>
</flow>
<flow name="ServiceFlow2" doc:name="ServiceFlow2">
<vm:inbound-endpoint exchange-pattern="request-response" path="Flow1-WT-Main"
doc:name="VM"/>
<cxf:jaxws-service serviceClass="com.test.services.schema.maindata.v1.MainData"
doc:name="SOAP"/>
<component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl"
doc:name="JavaMain_ServiceImpl"/>
</flow>
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

How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
Ramakrishna kapa
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB Integration
AnilKumar Etagowni
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
Santhosh Ramagiri
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
Muralidhar Gumma
 
Memcache basics on google app engine
Memcache basics on google app engineMemcache basics on google app engine
Memcache basics on google app engine
Ido Green
 
Activemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataActivemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker data
Ramakrishna Narkedamilli
 
Mule esb first http connector
Mule esb first http connectorMule esb first http connector
Mule esb first http connector
Germano Barba
 
Link Header-based Invalidation of Caches
Link Header-based Invalidation of CachesLink Header-based Invalidation of Caches
Link Header-based Invalidation of Caches
mikekelly
 
Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input data
AnilKumar Etagowni
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Praneethchampion
 

What's hot (12)

How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB Integration
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
 
Memcache basics on google app engine
Memcache basics on google app engineMemcache basics on google app engine
Memcache basics on google app engine
 
Activemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataActivemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker data
 
Mule esb first http connector
Mule esb first http connectorMule esb first http connector
Mule esb first http connector
 
Link Header-based Invalidation of Caches
Link Header-based Invalidation of CachesLink Header-based Invalidation of Caches
Link Header-based Invalidation of Caches
 
Configuring Wordpress W3 Total Cache
Configuring Wordpress W3 Total CacheConfiguring Wordpress W3 Total Cache
Configuring Wordpress W3 Total Cache
 
Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input data
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 

Viewers also liked

Simple web service vm
Simple web service vmSimple web service vm
Simple web service vm
Sunil Komarapu
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
Sunil Komarapu
 
Analisis caso de Etica /Alfredo sánchez leal
Analisis caso de Etica /Alfredo sánchez lealAnalisis caso de Etica /Alfredo sánchez leal
Analisis caso de Etica /Alfredo sánchez leal
Alfredo Sanchez
 
arte urbano
arte urbano arte urbano
arte urbano
luis piña
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
Sunil Komarapu
 
Presentación3
Presentación3Presentación3
Scatter gather
Scatter gather Scatter gather
Scatter gather
Sunil Komarapu
 
Los secretos de la mente millonaria t harv eker
Los secretos de la mente millonaria   t harv ekerLos secretos de la mente millonaria   t harv eker
Los secretos de la mente millonaria t harv eker
Fidel Mendoza
 
El plan de mercadeo(1) (1)
El plan de mercadeo(1) (1)El plan de mercadeo(1) (1)
El plan de mercadeo(1) (1)
juanpablo yarpazcoral
 
Maven part 1
Maven part 1Maven part 1
Maven part 1
Sunil Komarapu
 
commit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studiocommit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studio
Sunil Komarapu
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
Sunil Komarapu
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
Sunil Komarapu
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
Sunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Sunil Komarapu
 
Aguilera melania
Aguilera melaniaAguilera melania
Aguilera melania
melania365
 
Lean, aplicado a las personas y a la mejora continua
Lean, aplicado a las personas y a la mejora continuaLean, aplicado a las personas y a la mejora continua
Lean, aplicado a las personas y a la mejora continua
Maria Ruiz Romero
 

Viewers also liked (20)

Simple web service vm
Simple web service vmSimple web service vm
Simple web service vm
 
Maven
MavenMaven
Maven
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Analisis caso de Etica /Alfredo sánchez leal
Analisis caso de Etica /Alfredo sánchez lealAnalisis caso de Etica /Alfredo sánchez leal
Analisis caso de Etica /Alfredo sánchez leal
 
arte urbano
arte urbano arte urbano
arte urbano
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
 
Presentación3
Presentación3Presentación3
Presentación3
 
Scatter gather
Scatter gather Scatter gather
Scatter gather
 
Los secretos de la mente millonaria t harv eker
Los secretos de la mente millonaria   t harv ekerLos secretos de la mente millonaria   t harv eker
Los secretos de la mente millonaria t harv eker
 
El plan de mercadeo(1) (1)
El plan de mercadeo(1) (1)El plan de mercadeo(1) (1)
El plan de mercadeo(1) (1)
 
engr.Eslam
engr.Eslamengr.Eslam
engr.Eslam
 
Maven part 1
Maven part 1Maven part 1
Maven part 1
 
commit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studiocommit a project in svn using svn plugin in anypoint studio
commit a project in svn using svn plugin in anypoint studio
 
krutagna new
krutagna newkrutagna new
krutagna new
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Aguilera melania
Aguilera melaniaAguilera melania
Aguilera melania
 
Lean, aplicado a las personas y a la mejora continua
Lean, aplicado a las personas y a la mejora continuaLean, aplicado a las personas y a la mejora continua
Lean, aplicado a las personas y a la mejora continua
 

Similar to Caching and invalidating with managed store

Mule esb
Mule esbMule esb
Mule esb
javeed_mhd
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
AnilKumar Etagowni
 
Mule esb DataWeave
Mule esb DataWeaveMule esb DataWeave
Mule esb DataWeave
Praneethchampion
 
Mule esb Data Weave
Mule esb Data WeaveMule esb Data Weave
Mule esb Data Weave
F K
 
Mule esb dataweave
Mule esb dataweaveMule esb dataweave
Mule esb dataweave
Rajkattamuri
 
Mule esb
Mule esbMule esb
Mule esb
Sunil Komarapu
 
Mule esb
Mule esbMule esb
Mule esb
Hasan Syed
 
Mule esb
Mule esbMule esb
Mule esb
Khan625
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
Krishnakanth Goud
 
Mule esb:DataWeave
Mule esb:DataWeaveMule esb:DataWeave
Mule esb:DataWeave
AbdulImrankhan7
 
Mule esb
Mule esb Mule esb
Mule esb
mdfkhan625
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
Anirban Sen Chowdhary
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
Mohammed246
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
Ramakrishna Narkedamilli
 
Mulesoft xml to Java Conversion
Mulesoft xml to Java ConversionMulesoft xml to Java Conversion
Mulesoft xml to Java Conversion
v srikanth
 
Using jersey exception mapper
Using jersey exception mapperUsing jersey exception mapper
Using jersey exception mapper
Anirban Sen Chowdhary
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
Anirban Sen Chowdhary
 
Servlets Java Slides & Presentation
Servlets Java Slides & Presentation Servlets Java Slides & Presentation
Servlets Java Slides & Presentation
Anas Sa
 

Similar to Caching and invalidating with managed store (20)

Mule esb
Mule esbMule esb
Mule esb
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule esb DataWeave
Mule esb DataWeaveMule esb DataWeave
Mule esb DataWeave
 
Mule esb Data Weave
Mule esb Data WeaveMule esb Data Weave
Mule esb Data Weave
 
Mule esb dataweave
Mule esb dataweaveMule esb dataweave
Mule esb dataweave
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule esb:DataWeave
Mule esb:DataWeaveMule esb:DataWeave
Mule esb:DataWeave
 
Mule esb
Mule esb Mule esb
Mule esb
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
Mulesoft xml to Java Conversion
Mulesoft xml to Java ConversionMulesoft xml to Java Conversion
Mulesoft xml to Java Conversion
 
Using jersey exception mapper
Using jersey exception mapperUsing jersey exception mapper
Using jersey exception mapper
 
Playing with cxf interceptor in mule
Playing with cxf interceptor in mulePlaying with cxf interceptor in mule
Playing with cxf interceptor in mule
 
Servlets
ServletsServlets
Servlets
 
Servlets Java Slides & Presentation
Servlets Java Slides & Presentation Servlets Java Slides & Presentation
Servlets Java Slides & Presentation
 
19servlets
19servlets19servlets
19servlets
 

More from Sunil Komarapu

WebServices
WebServicesWebServices
WebServices
Sunil Komarapu
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
Sunil Komarapu
 
Mule esb Basics
Mule esb BasicsMule esb Basics
Mule esb Basics
Sunil Komarapu
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
Sunil Komarapu
 
Mule esb api layer
Mule esb api layerMule esb api layer
Mule esb api layer
Sunil Komarapu
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Sunil Komarapu
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Sunil Komarapu
 
Data weave
Data weave Data weave
Data weave
Sunil Komarapu
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
Sunil Komarapu
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with mule
Sunil Komarapu
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
Sunil Komarapu
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
Sunil Komarapu
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
Sunil Komarapu
 
Groovy with mule
Groovy with muleGroovy with mule
Groovy with mule
Sunil Komarapu
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
Sunil Komarapu
 
Jenkins
JenkinsJenkins
Jenkins2
Jenkins2Jenkins2
Jenkins2
Sunil Komarapu
 
Jenkins3
Jenkins3Jenkins3
Jenkins3
Sunil Komarapu
 
Maven ii
Maven iiMaven ii
Maven ii
Sunil Komarapu
 
Maven iii
Maven iiiMaven iii
Maven iii
Sunil Komarapu
 

More from Sunil Komarapu (20)

WebServices
WebServicesWebServices
WebServices
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule esb Basics
Mule esb BasicsMule esb Basics
Mule esb Basics
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule esb api layer
Mule esb api layerMule esb api layer
Mule esb api layer
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
Data weave
Data weave Data weave
Data weave
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
Automatic documantation with mule
Automatic documantation with muleAutomatic documantation with mule
Automatic documantation with mule
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Groovy with mule
Groovy with muleGroovy with mule
Groovy with mule
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
 
Jenkins
JenkinsJenkins
Jenkins
 
Jenkins2
Jenkins2Jenkins2
Jenkins2
 
Jenkins3
Jenkins3Jenkins3
Jenkins3
 
Maven ii
Maven iiMaven ii
Maven ii
 
Maven iii
Maven iiiMaven iii
Maven iii
 

Recently uploaded

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 

Recently uploaded (20)

Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 

Caching and invalidating with managed store

  • 2. Today’s topic we will be discussing the NonPersistentManagedObjectStore and we will not be doing any complex Caching configuration with spring beans in our Mule config. .
  • 3. How ??? I will show you how .
  • 4. So, let us consider we have configured a web service with the Mule cache scope in following way:-
  • 5. <flow name="ServiceFlow" doc:name="ServiceFlow"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" path="mainData" doc:name="HTTP" /> <object-to-string-transformer doc:name="Object to String"/> <ee:cache doc:name="Cache" cachingStrategy-ref="cachingStrategy" > <vm:outbound-endpoint exchange-pattern="request-response" path="Flow1-WT-Main" doc:name="VM"/> <object-to-string-transformer doc:name="Object to String"/> </ee:cache> </flow> <flow name="ServiceFlow2" doc:name="ServiceFlow2"> <vm:inbound-endpoint exchange-pattern="request-response" path="Flow1-WT-Main" doc:name="VM"/> <cxf:jaxws-service serviceClass="com.test.services.schema.maindata.v1.MainData" doc:name="SOAP"/> <component class="com.test.services.schema.maindata.v1.Impl.MainDataImpl" doc:name="JavaMain_ServiceImpl"/> </flow> Corresponding Mule flow will be :-
  • 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.