{"id":515001,"date":"2022-06-29T08:15:08","date_gmt":"2022-06-29T06:15:08","guid":{"rendered":"https:\/\/www.devoteam.com\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/"},"modified":"2022-06-29T08:15:08","modified_gmt":"2022-06-29T06:15:08","slug":"blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project","status":"publish","type":"expert-view","link":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/","title":{"rendered":"Blog Series, Part III: Applying caching API Policy Caching in CloudHub"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is the final post of this series and we will understand the mechanism of storing data on the server-side using an out of box feature of API Policy in Cloudhub.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Applying API Policy Caching in CloudHub<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In my previous post, I demonstrated the step-by-step guide on how to implement caching inside a Mule4 project. I will demonstrate a second approach on how to achieve the same end result but using a better, more innovative way from CloudHub meaning you don\u2019t need to implement it from inside your Mule4 project.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following steps are applicable <strong>once your application is deployed in the environment<\/strong> you selected. Ensure you have permission to apply \u2018Policies\u2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go to API Manager, select your application on API Administration, and click on your application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"92\" src=\"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>Policies<\/strong> section, click on <strong>Apply New Policy<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/CpkjUsq76YcOo6sfpGFPCI9hRm3Ru3dlhLlonTHIgsIiuvi9b77pAJF0LNOl5hPR4pYa4z8kHMf6c4VFBQf_amyHtT4KHiSa-8jgKNOTp7jan2R1dq1MD6MBjO8mWUp7dd8d6-tXnFJUG0u6rg\" alt=\"\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/y8BEH310YquwV1P4waK70LNbQQ2IPPOgI_XCQ7nlrG1AKs1l-X7nM458CoHDq9EWaHAgZub121M8hCs3TrRpsR5Ypf7astrGcSM7H46wqoSOEXq5Z9LUNPQIbHatiSjHin2WChOhqUuTuBNDWg\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It will display a window with all categories applicable to your application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"444\" src=\"https:\/\/lh5.googleusercontent.com\/6xVThz5ttP70LM8kx9DMk2VU6n0kir3pOH3NcsEfJ7conLb38KIj8alvmmKAVwMpDtgG25po0u_ZJRtrDSwia1IPLIOweEZtbIbGTSP24tdz-7l4AquDRFG2AdM6QYV3sSbZIsKPHp7i3CpUQw\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"207\" src=\"https:\/\/lh6.googleusercontent.com\/pN_YDNaKDo-sEDRGSW69BX_LrN2ELfk0Ccbv1fHwcjJR0QRRpOGeRemkXtYlmLeoGtE2fmYGHrzoaZ-o6mqo6q9tHmpZfb7RMNrsVtV4ArZv5eoN-AudreXJ5D0k2S1JawU6JhEdIAzBpApqIg\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"207\" src=\"https:\/\/lh6.googleusercontent.com\/8Db0Em0zdeo2-Soq4Q_beBAhQVmUY1Z54JUwm_M0n4_w1cfZHglKucbwb9CozQXWBbouZ4dmJ4kfPvy-0RQ760iTbmHCaJt1012UbsyxIobtvXv4WpvjohNPdCBJntUhJJx1FNuzAPW9JARQdA\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Configure with the following mandatory fields:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Field<\/td><td>Value<\/td><\/tr><tr><td>HTTP Caching Key<\/td><td>#[attributes.requestPath]<\/td><\/tr><tr><td>Maximum Cache Entries<\/td><td>10000<\/td><\/tr><tr><td>Entry Time To Live (in seconds)<\/td><td>600<\/td><\/tr><tr><td>Persistent Cache<\/td><td>True<\/td><\/tr><tr><td>Conditional Request Caching Expression<\/td><td>#[attributes.method == &#8216;GET&#8217; or attributes.method == &#8216;HEAD&#8217;]<\/td><\/tr><tr><td>Conditional Response Caching Expression<\/td><td>#[[200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501] contains attributes.statusCode]<\/td><\/tr><tr><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Method &amp; Resource conditions:<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apply configurations to all API methods &amp; resources<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"639\" src=\"https:\/\/lh4.googleusercontent.com\/yDFZVM2kBlnse9dtLFL8D_CdGq0Nzs6Jnplk5ZTPErCnD45F_OLnmu2c7cgoJzUwnvdio-s6S1GC_y6ZXMufiJA6eEB0l5ePLaDQpfFyDz8uxlQwsHKeU88esSRWcJy-Q6xMzakBHD8aLtWttg\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"481\" src=\"https:\/\/lh3.googleusercontent.com\/fYvU9f-Zfq95C2gYlL7ELgT_uVU3kUQL2TUF_QCELSpeJhZc2PKRww40jAURiQYU2qwi-6M3rolyx4-arfU0ENoL7RRpR7XFfWk6rGoeqcMMt0kptv7VJ0h9rMKN3F7YWaj7vqpBKGizBnCZ4g\"><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm and verify all configurations as image below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/y0z38s0SgSElV6BhphPqG8uGviW3h7PWZy6J_c-jVR3I7227xwNPvzv0LuUN82_T13AF78T6yg8d1-RcW6SB4GPyStahsNQx8qBx32f7s2QdX12cYy77ibH_5jUoBgw9jsw-VrlOcZEJdAwqYQ\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Applying and enforcing the API Policy will need to redeploy the application.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As a result, logs will reflect the following:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"372\" src=\"https:\/\/lh4.googleusercontent.com\/EC1bgw7TWgIPSsF44RkjmUeF2OrEFbzz28NKjDF0uRddimnLEim2ziSVaoh5k7zb3zBda76cgPyo5T9lqUYihp8YCwf2XRWSGKLPZNQbIpO4so1sVE-E4CHxKSLinB1o5bST0B774JU-Rr5eOw\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"204\" src=\"https:\/\/lh6.googleusercontent.com\/Os9FEwaAuQNIrcIbaRCLMsmvOzl6ZObUc3bD4euptA900aMHQQNSwzNHmwFwG7ryqm4tkvLLekjErecg2e5RXso-CoR8GBHm-eV9B7_QTCK7srToBV7teMHLOQjmXqKcby0HcPOTNgZFpT4blQ\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing HTTP Caching policy&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use curl to send a request and obtain a verbose response<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"517\" src=\"https:\/\/lh3.googleusercontent.com\/M5IhfWW4MV-zQRuI-fwnB6Mg1jTZ61lr6uGbr-zQGfAAHUHDtlouU5cFouTHQwI_HsO6TWCxyLqyYH2-jxqBpwy2JimE9QxHJW5HEDP6o201DVa5zPLwIl1Qhwuccb7q4O2j_EpfMWLDQFYTCg\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify Object Store at application&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/mWfF0bQAzoDMIX3UWXbcTor90G-xnlLM6wxHqoXt7ORfFPoy6dISZZVyu9W2K3IpXATnxXsUduF8GERnKMQh5Ih8FpwDNG8nGmKHwp1dGfVXWVYR_g6jUCmohkMPVP1UUdyNZh54lJXkr9snYQ\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As a result, the HTTP request path is used to check against policy resource matching.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/tByasdIDwYXiDOcZawQ0irCIYOFTYTauwpH1LzL2sKPnz-RVYvoGA_fwE5yG1f1kM-MqiQkfd99QcEd1C6WO6_6rMOIRX2YtSoyscGTartf8_wIMyvHqh043uLrqepx74e2akEX_IEvPWQy3OA\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Testing second time Caching Policy<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"371\" src=\"https:\/\/lh6.googleusercontent.com\/HcAr4K_CVHtAWjiRZNI2vmxcbPP62zh1o6LINVDY-SfrmaZ4cOALjUOAYKFVs1rhHO9eL66C9bB7oJ9pR6Ho3vQHc6VXpx7uWGcER5iKGrHyKe9A4qxEGJis4B9oevHZkkzgSuPIcOnc-3hvSg\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">New keys on Object Store<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/5Gt0K1q9p5-LNkWZAutbOYeAwPYOyKyUgyP2aaMcNG21NPsBT6A8cuLmukO5EOgGptsAcEQ9xn7qv8Er5HvGu-HHcawiySSBZMZkVDlHCejwiINqoqBGXd3_BiPKgscRs8l6FotiXltiwGmctQ\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Re-testing first request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pay special attention to the \u2018age\u2019 header. (In seconds)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/tAHu0SYXMW2_cUVW8ybKbQfKzYFU5U_-DJQWrU65NoTbxP05t_voG-yPO9yVs15mAiyHCOXDvh6lPYfiNAu-NosEJ6EdORj_RQjbD16iyg3Ee384IC7BxgoLbeZg2wrvd4j3FXe6ox2a-ux9VA\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"155\" src=\"https:\/\/lh5.googleusercontent.com\/V85Nc7UNRq1IH4SwEQioXiE_QHlMf1vVc3GTbBcBPw_Kr5sB7RZMrU_MgiYxq3KUX-BPH_InjZ21Vl9V_xqdY5q0QPOd9OiDWTu7sSf8c4Xz4YoGDj4_pe0GeQoUyTT25EJ5NU-SZzIVNTafYQ\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once TTL is reached, Object Store is updated&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/rVj9B5suovdI-6ovjrxgCXs8lX95HLfL5zFw5R9KBW-Z_RzCJ0PwdQbFttI7Kfuo63gGKmUX1zO8MTSZaeo6ojY_aWsR5iIU4YTCQEd92AhhUT9_derEx_wuBwHx9pQN09_9j1MEYZTyolbm-w\" alt=\"\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Extra Considerations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Distributed cache:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enables the underlying cache to be distributed. Select this option if the deployment target is a cluster or multiple cloudhub workers. To use distributed caching in Cloudhub the objectStoreV2 checkbox must be checked in runtime manager application properties.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Persistent cache:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Indicates if the cache will be persistent across runtime restart. To use persistent caching in Cloudhub the objectStoreV2 checkbox must be checked in runtime manager application properties.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>HTTP Caching Directives<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enables the usage of Cache-Control header directives. Supported headers are &#8220;Cache-Control&#8221; with supported values: max-age=&lt;seconds&gt;, s-maxage=&lt;seconds&gt;, no-cache and no-store; and &#8220;Expires&#8221; whose value is &lt;date in RFC 1123 format&gt; (E.g. &#8220;Mon, 25 June 2018 19:29:52 GMT&#8221;). It supports comma-separated multiple values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conditional Request Caching Expression<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only the requests for which this expression is true will interact with the cache. This field is a dataweave expression. For further information on additional variables available check the documentation cited in the HTTP Caching key description.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">#[attributes.method == &#8216;GET&#8217; or attributes.method == &#8216;HEAD&#8217;]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conditional Response Caching Expression<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only the responses for which this expression is true will be stored in the cache. This field is a dataweave expression. For further information on additional variables available check the documentation cited in the HTTP Caching key description.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">#[[200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501] contains attributes.statusCode]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuring Policy Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Summary of configuration available in API Manager.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Parameter<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Default<\/strong><\/td><td><strong>Required<\/strong><\/td><\/tr><tr><td>HTTP Caching Key<\/td><td>Dataweave expression.<\/td><td>#[attributes.requestPath]<\/td><td>Yes<\/td><\/tr><tr><td>Maximum Cache Entries<\/td><td>A maximum number of entries that can be stored in the cache at any given time.<\/td><td>10000<\/td><td>Yes<\/td><\/tr><tr><td>Entry Time To Live<\/td><td>Amount of time (seconds) after which the entry expires from the cache<\/td><td>600<\/td><td>Yes<\/td><\/tr><tr><td>Distributed<\/td><td>To be distributed among different nodes in a cluster.<\/td><td>false<\/td><td>Yes<\/td><\/tr><tr><td>Persistent Cache<\/td><td>To persist between different restarts of the mule instance.<\/td><td>false<\/td><td>Yes<\/td><\/tr><tr><td>Follow HTTP Caching directives<\/td><td>Use of Cache-Control header directives<\/td><td>true<\/td><td>Yes<\/td><\/tr><tr><td>Conditional Request Caching Expression<\/td><td>Dataweave expression to determine which requests are cached.#[attributes.method == \u2018GET\u2019 or attributes.method == \u2018HEAD\u2019]<\/td><td>&#8211;<\/td><td>No<\/td><\/tr><tr><td>Conditional Response Caching Expression<\/td><td>Dataweave expression to determine which responses are cached.#[[200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501] contains attributes.statusCode]<\/td><td>&#8211;<\/td><td>No<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">References&nbsp;<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">API REST Countries API&nbsp;<\/h3>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/www.programmableweb.com\/api\/rest-countries-rest-api-v205\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-https-countrylayer-com wp-block-embed-https-countrylayer-com\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/countrylayer.com\/pricing\/\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Endpoint: <a href=\"https:\/\/restcountries.eu\/rest\/v2\/\">https:\/\/restcountries.eu\/rest\/v2\/<\/a>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Documentation: <a href=\"https:\/\/countrylayer.com\/documentation\/\">https:\/\/countrylayer.com\/documentation\/<\/a>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Obtain a Free API Key&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"416\" src=\"https:\/\/lh6.googleusercontent.com\/cUpRvgPRHIOnzYAa9T0A2ELOZzCR3oejLEkNKn-HgYqMVaX2eitMSVvwwe5y6cPrb519wi2CZoROYPN7aBxgXZFK_PHb2Cq4jFQ0jtYtw6IePTTluDGH290OMk1XpN1qGcKuhCqkvTjE0iJPww\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Quota Limits<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Retrieve a list of countries<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/I5o8f0yD1IpOcFPxJboZg1nUzGBaczOn7eJATCcxmWnFz-bce8Xpmgh6cmfHrPcX-J6Hi3OehF4yPVtKhqk8KnLza4CpKcI97viO0k7sG3Lrd8Fznh3DeP4shES7NJ7dEz8_IEX_FuBY9o7DhQ\" alt=\"\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Retrieve a country &#8211; FullText<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"537\" src=\"https:\/\/lh6.googleusercontent.com\/jJL9QReH2v-NOY90yoSmBNNr4B1k5L3XnG4hwQ9ojvzd0F1twCfq6xdS2S3OvujTg8YAjhPKYk_pBJIPTI6Vt6F18qfRAveaRqfx-kUJAsEII_HUPgAWJ8fBtkZeLoF01qdsSODo90I9CS707A\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Retrieve a country &#8211; Partial<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"537\" src=\"https:\/\/lh4.googleusercontent.com\/3c-I-0qAnwKGhymgXGbtYLrhcNahLCZi9c-dYl9yumWxVODo_qBre3uxEmiXvh-TT-iB76gtN0r77Ynj4yOU89kS_Afl9CEEY-P632hHzE7LBhXHAVscLDsBphrYIuHyZAdZRgNkTjswwryeHg\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Retrieve a country by capital&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"537\" src=\"https:\/\/lh6.googleusercontent.com\/fz1rN3csVwFTxqsmpeY0KeO_SbuyOc8dDIrzkXegK9Er9JcGbh36ux-LqkUbuJRcnoczOit6Ff1KitXlI-dxUmPNGQ0_dSELisxP-FIEo56ByxHLvhfwjbKAdETESpWmFQW_XXBeSMPPgDxMbw\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Read the other <a href=\"https:\/\/splatform.devoteam.com\/insights-events\/\">S Platform blog posts<\/a> written by our experts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are interested in working with the Devoteam S Platform, click <a href=\"https:\/\/splatform.devoteam.com\/join-us\/\">here!<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the final post of this series and we will understand the mechanism of storing data on the server-side using an out of box feature of API Policy in Cloudhub. Applying API Policy Caching in CloudHub In my previous post, I demonstrated the step-by-step guide on how to implement caching inside a Mule4 project. [&hellip;]<\/p>\n","protected":false},"featured_media":0,"template":"","categories":[],"tags":[],"industry":[],"class_list":["post-515001","expert-view","type-expert-view","status-publish","hentry"],"acf":[],"cards":"\n\t<div class=\"single-post-card\">\n\n\t\t\n\n\t\t\n\t\t<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-43282307 wp-block-group-is-layout-flex\">\n\t<p style=\"font-style:normal;font-weight:700\" class=\"has-link-color wp-elements-1 wp-block-lp-post-type has-text-color has-primary-color has-small-font-size\">Expert View<\/p>\n\n\t\t\n\t\t<h3 style=\"font-style:normal;font-weight:400\" class=\"wp-block-post-title has-base-font-size\"><a href=\"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/\" target=\"_self\" >Blog Series, Part III: Applying caching API Policy Caching in CloudHub<\/a><\/h3><\/div>\n\t\t\n\t<\/div>\n\n","yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.4 (Yoast SEO v28.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Blog Series, Part III: Applying caching API Policy Caching in CloudHub | Devoteam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Blog Series, Part III: Applying caching API Policy Caching in CloudHub\" \/>\n<meta property=\"og:description\" content=\"This is the final post of this series and we will understand the mechanism of storing data on the server-side using an out of box feature of API Policy in Cloudhub. Applying API Policy Caching in CloudHub In my previous post, I demonstrated the step-by-step guide on how to implement caching inside a Mule4 project. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/\" \/>\n<meta property=\"og:site_name\" content=\"Devoteam\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/\",\"url\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/\",\"name\":\"Blog Series, Part III: Applying caching API Policy Caching in CloudHub | Devoteam\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw\",\"datePublished\":\"2022-06-29T06:15:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/#breadcrumb\"},\"inLanguage\":\"en-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-PT\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw\",\"contentUrl\":\"https:\\\/\\\/lh6.googleusercontent.com\\\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert View\",\"item\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/expert-view\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Blog Series, Part III: Applying caching API Policy Caching in CloudHub\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/#website\",\"url\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/\",\"name\":\"Devoteam\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/devoteam.info\\\/en-pt\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-PT\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Blog Series, Part III: Applying caching API Policy Caching in CloudHub | Devoteam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/","og_locale":"en_US","og_type":"article","og_title":"Blog Series, Part III: Applying caching API Policy Caching in CloudHub","og_description":"This is the final post of this series and we will understand the mechanism of storing data on the server-side using an out of box feature of API Policy in Cloudhub. Applying API Policy Caching in CloudHub In my previous post, I demonstrated the step-by-step guide on how to implement caching inside a Mule4 project. [&hellip;]","og_url":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/","og_site_name":"Devoteam","og_image":[{"url":"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/","url":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/","name":"Blog Series, Part III: Applying caching API Policy Caching in CloudHub | Devoteam","isPartOf":{"@id":"https:\/\/devoteam.info\/en-pt\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/#primaryimage"},"image":{"@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/#primaryimage"},"thumbnailUrl":"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw","datePublished":"2022-06-29T06:15:08+00:00","breadcrumb":{"@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/#breadcrumb"},"inLanguage":"en-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-PT","@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/#primaryimage","url":"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw","contentUrl":"https:\/\/lh6.googleusercontent.com\/F_VABk1pU21cv-zmuHwxJCUOl4x7DJQzZDyaGjcvR4WTTzyzo1hW8Eb_mrO2c2GmOMxPNU5xm0HOZerDvFPVrNp1OZs6NKTFESKWItYdcXLWtN9VUPxqzshqzHqf4TXK34kkVTYaDkJSxvZJbw"},{"@type":"BreadcrumbList","@id":"https:\/\/devoteam.info\/en-pt\/expert-view\/blog-series-part-3-how-to-apply-caching-strategy-in-a-mule4-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devoteam.info\/en-pt\/"},{"@type":"ListItem","position":2,"name":"Expert View","item":"https:\/\/devoteam.info\/en-pt\/expert-view\/"},{"@type":"ListItem","position":3,"name":"Blog Series, Part III: Applying caching API Policy Caching in CloudHub"}]},{"@type":"WebSite","@id":"https:\/\/devoteam.info\/en-pt\/#website","url":"https:\/\/devoteam.info\/en-pt\/","name":"Devoteam","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devoteam.info\/en-pt\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-PT"}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"tomvermeersch","author_link":"https:\/\/devoteam.info\/en-pt\/author\/"},"uagb_comment_info":0,"uagb_excerpt":"This is the final post of this series and we will understand the mechanism of storing data on the server-side using an out of box feature of API Policy in Cloudhub. Applying API Policy Caching in CloudHub In my previous post, I demonstrated the step-by-step guide on how to implement caching inside a Mule4 project.&hellip;","_links":{"self":[{"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/expert-view\/515001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/expert-view"}],"about":[{"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/types\/expert-view"}],"version-history":[{"count":0,"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/expert-view\/515001\/revisions"}],"wp:attachment":[{"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/media?parent=515001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/categories?post=515001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/tags?post=515001"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/devoteam.info\/en-pt\/wp-json\/wp\/v2\/industry?post=515001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}