SlideShare a Scribd company logo
Cache For Community Edition
We have seen examples on Mule Cache mechanism with Cache Scope. But this time we will see implementing
Cache for Mule Community Edition.
Mule Community Edition doesn’t have the Cache Scope as Mule Enterprise Edition, so to implement Cache in
Community Edition we require Custom Interceptor.
You can already refer https://github.com/ddossot/mule-in-action-
2e/blob/master/chapter12/src/main/java/com/prancingdonkey/interceptor/PayloadCacheInterceptor.java
which shows implementing Cache in Community Edition by David Dassot.
In my demonstration I have modified the code and implemented on the top of it with additional Filter
Expression
Cache for community edition
To use Cache with Mule we have to construct our flow in following way :-
You can see the flow is divided into 2 parts and is connected by VM component. You can see we have
used Custom Interceptor to implement Cache in this Community Edition
Our Mule config will be as follow:-
You can see we are using our Custom interceptor implemented and a spring property filterExpression
which will filter the expression we want to implement .
Our Custom interceptor Java class:-
In next step we will be running and testing the application. This web
service will interact 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:-
And that means our Cache is working and it’s responding from the Cache and not hitting the
actual Database !!! So our Custom interceptor is implementing the Cache !!
So you can see that we have implemented the Cache for the Community Edition which has
the feature of filtering the expression like the Cache scope of Enterprise Edition.
So, you can implement your own Cache using Custom Interceptor.
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Cache for community edition

More Related Content

PPTX
Caching and invalidating with managed store
irfan1008
 
PPTX
Cache for community edition
irfan1008
 
PPTX
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
PPTX
Running mule standalone
Son Nguyen
 
PPTX
Mule soap
Khasim Saheb
 
PPTX
Scheduling and monitoring with java in mule
Anirban Sen Chowdhary
 
PPTX
Initialize database in Mule part2
Anirban Sen Chowdhary
 
PPTX
Mule soap
D.Rajesh Kumar
 
Caching and invalidating with managed store
irfan1008
 
Cache for community edition
irfan1008
 
Timer Interceptor in Mule
Anirban Sen Chowdhary
 
Running mule standalone
Son Nguyen
 
Mule soap
Khasim Saheb
 
Scheduling and monitoring with java in mule
Anirban Sen Chowdhary
 
Initialize database in Mule part2
Anirban Sen Chowdhary
 
Mule soap
D.Rajesh Kumar
 

What's hot (11)

PPTX
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
PPTX
Spicing your mule response
Anirban Sen Chowdhary
 
PPTX
Deploy apps in standalone with maven
Anirban Sen Chowdhary
 
PPTX
Deploying and Running in Mule
Khasim Saheb
 
PPTX
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
PPTX
Scatter gather in mule
Khasim Cise
 
PPTX
Cache for community edition
Anirban Sen Chowdhary
 
PPTX
Mule with drools
F K
 
PPTX
Mule quartz
Praneethchampion
 
PPTX
Composite source in bound and out-bound
Son Nguyen
 
PPTX
Validating a soap request in mule
Anirban Sen Chowdhary
 
Getting anypoint studios all versions
Anirban Sen Chowdhary
 
Spicing your mule response
Anirban Sen Chowdhary
 
Deploy apps in standalone with maven
Anirban Sen Chowdhary
 
Deploying and Running in Mule
Khasim Saheb
 
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Scatter gather in mule
Khasim Cise
 
Cache for community edition
Anirban Sen Chowdhary
 
Mule with drools
F K
 
Mule quartz
Praneethchampion
 
Composite source in bound and out-bound
Son Nguyen
 
Validating a soap request in mule
Anirban Sen Chowdhary
 
Ad

Viewers also liked (14)

PDF
Interruptor gangorra redonda pulsante na 6A terminal faston 1/4" serie FK R337
Fernik
 
PDF
Gravidez Da Amizade 7
Serena
 
DOCX
imperfect magazine articles
Isabella Basco
 
PDF
licenca0001.PDF
Zoran Todorovski
 
PPT
Konkurs
vikgall
 
PPT
Renacimiento espanol2
superhero001
 
PPTX
Question 3
grandparent
 
DOCX
Lowry contact sheet
hannahmorse
 
PPTX
Creating dynamic json
mdfkhan625
 
PDF
Er 2a
Chris Raia
 
PPTX
2.error log
arephyzx
 
PDF
Big duck jep_brandraisingteens_5-09_reducedsize
Big Duck
 
PPTX
Trabalhando a paragrafação a partir do tema “diversidade étnico-racial indígena”
Breados Online
 
DOCX
Resume_Anurag_Design_Verification_2+_yrs
ANURAG KAVADANA
 
Interruptor gangorra redonda pulsante na 6A terminal faston 1/4" serie FK R337
Fernik
 
Gravidez Da Amizade 7
Serena
 
imperfect magazine articles
Isabella Basco
 
licenca0001.PDF
Zoran Todorovski
 
Konkurs
vikgall
 
Renacimiento espanol2
superhero001
 
Question 3
grandparent
 
Lowry contact sheet
hannahmorse
 
Creating dynamic json
mdfkhan625
 
Er 2a
Chris Raia
 
2.error log
arephyzx
 
Big duck jep_brandraisingteens_5-09_reducedsize
Big Duck
 
Trabalhando a paragrafação a partir do tema “diversidade étnico-racial indígena”
Breados Online
 
Resume_Anurag_Design_Verification_2+_yrs
ANURAG KAVADANA
 
Ad

Similar to Cache for community edition (10)

PPTX
Caching strategies in MuleSoft
NeerajKumar1965
 
PPTX
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
PPT
Cache scope and strategy
Harish43
 
PPT
Cachescope
ChittipoluKeshav
 
PPTX
Improving performance with cache scope in mule
Ankit Lawaniya
 
PPTX
Mule Cache Scope
Ankush Sharma
 
ODP
Caching Strategies
Michal Špaček
 
PPTX
Meetup bangalore-sept5th 2020 (1)
D.Rajesh Kumar
 
PPTX
Caching
saravanan_k83
 
PDF
Caching in HTTP
Alexander Shopov
 
Caching strategies in MuleSoft
NeerajKumar1965
 
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
Cache scope and strategy
Harish43
 
Cachescope
ChittipoluKeshav
 
Improving performance with cache scope in mule
Ankit Lawaniya
 
Mule Cache Scope
Ankush Sharma
 
Caching Strategies
Michal Špaček
 
Meetup bangalore-sept5th 2020 (1)
D.Rajesh Kumar
 
Caching
saravanan_k83
 
Caching in HTTP
Alexander Shopov
 

More from mdfkhan625 (20)

PPTX
Mapping and listing with mule
mdfkhan625
 
PPTX
How to use message properties component
mdfkhan625
 
PPTX
How to use expression filter
mdfkhan625
 
PPTX
Data weave
mdfkhan625
 
PPT
Anypoint data gateway
mdfkhan625
 
PPTX
Webservice with vm in mule
mdfkhan625
 
PPTX
Validating soap request in mule
mdfkhan625
 
PPTX
Using xslt in mule
mdfkhan625
 
PPTX
Groovy example in mule
mdfkhan625
 
PPTX
Scatter gather flow control
mdfkhan625
 
PPTX
Mule with velocity
mdfkhan625
 
PPTX
Mule with rabbit mq
mdfkhan625
 
PPTX
Mule with quartz
mdfkhan625
 
PPTX
Mule with drools
mdfkhan625
 
PPTX
Mule esb
mdfkhan625
 
PPTX
Idempotent filter with simple file
mdfkhan625
 
PPTX
Converting with custom transformer
mdfkhan625
 
PPTX
Caching and invalidating with managed store
mdfkhan625
 
PPTX
Automatic documantation with mule
mdfkhan625
 
PPTX
Webservice with vm
mdfkhan625
 
Mapping and listing with mule
mdfkhan625
 
How to use message properties component
mdfkhan625
 
How to use expression filter
mdfkhan625
 
Data weave
mdfkhan625
 
Anypoint data gateway
mdfkhan625
 
Webservice with vm in mule
mdfkhan625
 
Validating soap request in mule
mdfkhan625
 
Using xslt in mule
mdfkhan625
 
Groovy example in mule
mdfkhan625
 
Scatter gather flow control
mdfkhan625
 
Mule with velocity
mdfkhan625
 
Mule with rabbit mq
mdfkhan625
 
Mule with quartz
mdfkhan625
 
Mule with drools
mdfkhan625
 
Mule esb
mdfkhan625
 
Idempotent filter with simple file
mdfkhan625
 
Converting with custom transformer
mdfkhan625
 
Caching and invalidating with managed store
mdfkhan625
 
Automatic documantation with mule
mdfkhan625
 
Webservice with vm
mdfkhan625
 

Recently uploaded (20)

PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Doc9.....................................
SofiaCollazos
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 

Cache for community edition

  • 2. We have seen examples on Mule Cache mechanism with Cache Scope. But this time we will see implementing Cache for Mule Community Edition. Mule Community Edition doesn’t have the Cache Scope as Mule Enterprise Edition, so to implement Cache in Community Edition we require Custom Interceptor. You can already refer https://github.com/ddossot/mule-in-action- 2e/blob/master/chapter12/src/main/java/com/prancingdonkey/interceptor/PayloadCacheInterceptor.java which shows implementing Cache in Community Edition by David Dassot. In my demonstration I have modified the code and implemented on the top of it with additional Filter Expression
  • 4. To use Cache with Mule we have to construct our flow in following way :- You can see the flow is divided into 2 parts and is connected by VM component. You can see we have used Custom Interceptor to implement Cache in this Community Edition
  • 5. Our Mule config will be as follow:- You can see we are using our Custom interceptor implemented and a spring property filterExpression which will filter the expression we want to implement .
  • 6. Our Custom interceptor Java class:-
  • 7. In next step we will be running and testing the application. This web service will interact 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:- And that means our Cache is working and it’s responding from the Cache and not hitting the actual Database !!! So our Custom interceptor is implementing the Cache !!
  • 11. So you can see that we have implemented the Cache for the Community Edition which has the feature of filtering the expression like the Cache scope of Enterprise Edition. So, you can implement your own Cache using Custom Interceptor.
  • 12. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 