{"id":392361,"date":"2023-07-26T13:30:53","date_gmt":"2023-07-26T13:30:53","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=392361"},"modified":"2023-08-10T09:18:31","modified_gmt":"2023-08-10T09:18:31","slug":"how-to-use-redis-for-api-caching-in-cs-cart","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/","title":{"rendered":"How to Use Redis for API Caching in CS-Cart?"},"content":{"rendered":"\n<p>Using Redis for API caching in CS-Cart can significantly improve the performance and response time of your application by reducing the load on your database and speeding up data retrieval. <\/p>\n\n\n\n<p>Redis (Remote Dictionary Server) is an in-memory data store that allows you to cache frequently accessed data and retrieve it quickly without hitting the database every time.<\/p>\n\n\n\n<p>Here&#8217;s a step-by-step guide on how to implement API caching with Redis in CS-Cart:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install Redis<\/h2>\n\n\n\n<p>Start by installing Redis on your server or using a managed Redis service. Follow the instructions below to install Redis:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>For Linux users, run the following commands:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo apt update\nsudo apt install redis-server<\/pre>\n\n\n\n<p>    2. For macOS users, use Homebrew:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">brew install redis<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Configure Redis in CS-Cart<\/h2>\n\n\n\n<p>Once Redis is installed, you need to configure CS-Cart to use Redis for caching. To do this, <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$config&#091;&#039;cache_backend&#039;] = &#039;redis&#039;;\n$config&#091;&#039;cache_redis_server&#039;] = &#039;localhost&#039;; \/\/ Change this to your Redis server address\n$config&#091;&#039;cache_redis_port&#039;] = 6379; \/\/ Change this to your Redis server port\n$config&#091;&#039;cache_redis_database&#039;] = 0; \/\/ Change this to your desired database number (0 by default)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Enable Caching for API Responses<\/h2>\n\n\n\n<p>In your CS-Cart API implementation, you can now enable caching for API responses that are suitable for caching. You can choose which API responds to the cache based on their frequency of access and how often the data changes.<\/p>\n\n\n\n<p>Besides that, the Redis API Caching can also be useful for improving the performance of your <a href=\"https:\/\/store.webkul.com\/cs-cart-mobile-app.html\" target=\"_blank\" rel=\"noreferrer noopener\">CS Cart Mobile App<\/a>.<\/p>\n\n\n\n<p>Now let&#8217;s go ahead and enable caching for API responses in your CS-Cart API implementation. <\/p>\n\n\n\n<p>We will use <a href=\"https:\/\/github.com\/predis\/predis\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">predis<\/a> package, and download it via Composer or GitHub.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"654\" height=\"268\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\" alt=\"screenshot_1691572081492\" class=\"wp-image-394757\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png 654w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492-300x123.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492-250x102.png 250w\" sizes=\"(max-width: 654px) 100vw, 654px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Next, you may create a helper class that will be helpful to execute Redis operations.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">namespace Tygh\\YourAddonName;\n\nuse Predis\\Client;\n\nclass Helper\n{\n    protected $redis;\n\n    public function __construct()\n    {\n        $config = Registry::get(&quot;config&quot;);\n\n        $this-&gt;redis = new Client(&#091;\n            &#039;scheme&#039; =&gt; &#039;tcp&#039;,\n            &#039;host&#039;   =&gt; $config&#091;&#039;cache_redis_server&#039;], \/\/ Adjust based on your Redis server \n            &#039;port&#039;   =&gt; $config&#091;&#039;cache_redis_port&#039;], \/\/ Adjust based on your Redis server \n        ]);\n    }\n\n    public function get($key)\n    {\n        $data = $this-&gt;redis-&gt;get($key);\n        return $data !== null ? unserialize($data) : false;\n    }\n\n    public function set($key, $value, $expiration = 3600) \n    {\n        $this-&gt;redis-&gt;setex($key, $expiration, serialize($value));\n    }\n}<\/pre>\n\n\n\n<p>This helper class will create a Redis client instance. The get() and set() methods are used for retrieving and storing data.<\/p>\n\n\n\n<p>Let&#8217;s just now implement Redis caching into product API.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">namespace Tygh\\Api\\Entities;\n\nuse Tygh\\Api\\AEntity;\nuse Tygh\\Api\\Response;\nuse Tygh\\Enum\\YesNo;\nuse Tygh\\Registry;\nuse Tygh\\Addons\\Helper;\n\nclass Products extends AEntity\n{\n    public function index()\n    {\n        $redisCache = new Helper();\n\n        \/\/ Check if data is cached in Redis\n        $cacheKey = &#039;product_list&#039;;\n\n        $cachedData = $redisCache-&gt;get($cacheKey);\n\n        if ($cachedData !== false) {\n            return array(\n                &#039;status&#039; =&gt; Response::STATUS_OK,\n                &#039;data&#039;   =&gt; $cachedData\n            );\n        }\n        $lang_code = $this-&gt;getLanguageCode($params);\n\n        \/\/ Set default values to input params\n        $default_params = &#091;\n            &#039;match&#039;            =&gt; &#039;all&#039;,\n            &#039;subcats&#039;          =&gt; YesNo::YES,\n            &#039;pcode_from_q&#039;     =&gt; YesNo::YES,\n            &#039;pshort&#039;           =&gt; YesNo::YES,\n            &#039;pfull&#039;            =&gt; YesNo::YES,\n            &#039;pname&#039;            =&gt; YesNo::YES,\n            &#039;pkeywords&#039;        =&gt; YesNo::YES,\n            &#039;search_performed&#039; =&gt; YesNo::YES,\n        ];\n        $params = array_merge($default_params, $params);\n\n        $items_per_page = $this-&gt;safeGet($params, &#039;items_per_page&#039;, Registry::get(&#039;settings.Appearance.admin_elements_per_page&#039;));\n        list($products, $search) = fn_get_products($params, $items_per_page, $lang_code);\n\n        $data = array(\n            &#039;products&#039; =&gt; array_values($products),\n            &#039;params&#039;   =&gt; $search,\n        );\n\n        \/\/ Cache the product data\n        $redisCache-&gt;set($cacheKey, $data, 3600);\n\n        return array(\n            &#039;status&#039; =&gt;  Response::STATUS_OK,\n            &#039;data&#039;   =&gt; $data\n        );\n    }\n    \/\/ ... (other methods)\n}<\/pre>\n\n\n\n<p>In the above code, we have modified <code>Products<\/code> API entity in CS-Cart which retrieves and caches product list, utilizing Redis caching for improved performance. <\/p>\n\n\n\n<p>The retrieved product information is cached in Redis with a specified time-to-live (TTL) of 3600 seconds (1 hour) for subsequent faster access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Response Time Before using Redis<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"842\" height=\"629\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581409750.png\" alt=\"screenshot_1691581409750\" class=\"wp-image-394851\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581409750.png 842w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581409750-300x224.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581409750-250x187.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581409750-768x574.png 768w\" sizes=\"(max-width: 842px) 100vw, 842px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Response Time After using Redis<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"843\" height=\"628\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581373507.png\" alt=\"screenshot_1691581373507\" class=\"wp-image-394853\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581373507.png 843w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581373507-300x223.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581373507-250x186.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691581373507-768x572.png 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>After Redis Response: <\/strong>The image illustrates the API response time with Redis caching implemented, showcasing significantly reduced response times, as cached data is swiftly retrieved, enhancing overall performance and user experience.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Note: Before implementing any caching mechanism, make sure to carefully analyze your application&#8217;s requirements and choose which data to cache to avoid serving stale or outdated content to users.<\/p>\n<\/blockquote>\n\n\n\n<p>We hope this article has provided you with valuable insights into using Redis for API caching. Start implementing Redis caching in your applications and enjoy the benefits of enhanced performance and scalability. <\/p>\n\n\n\n<p>So, that was much about how to use Redis for Api caching in CS-Cart. If you need custom&nbsp;<a href=\"https:\/\/webkul.com\/cs-cart-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">CS-Cart Development services<\/a>&nbsp;then feel free to&nbsp;<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>&nbsp;and also explore our exclusive range of&nbsp;<a href=\"https:\/\/store.webkul.com\/CS-Cart.html\" target=\"_blank\" rel=\"noreferrer noopener\">CS-Cart Addons<\/a>.<br>!!Have a Great Day Ahead!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Redis for API caching in CS-Cart can significantly improve the performance and response time of your application by reducing the load on your database and speeding up data retrieval. Redis (Remote Dictionary Server) is an in-memory data store that allows you to cache frequently accessed data and retrieve it quickly without hitting the database <a href=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":480,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1173],"tags":[292,14287,1316,5282],"class_list":["post-392361","post","type-post","status-publish","format-standard","hentry","category-api-2","tag-api","tag-cscart","tag-redis","tag-redis-cache"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Redis for API Caching in CS-Cart?<\/title>\n<meta name=\"description\" content=\"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Redis for API Caching in CS-Cart?\" \/>\n<meta property=\"og:description\" content=\"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-26T13:30:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-10T09:18:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\" \/>\n<meta name=\"author\" content=\"Prashant Bisht\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prashant Bisht\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\"},\"author\":{\"name\":\"Prashant Bisht\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/97d715f8b3484277df4f66e20d11a5ed\"},\"headline\":\"How to Use Redis for API Caching in CS-Cart?\",\"datePublished\":\"2023-07-26T13:30:53+00:00\",\"dateModified\":\"2023-08-10T09:18:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\"},\"wordCount\":465,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\",\"keywords\":[\"api\",\"cscart\",\"redis\",\"redis cache\"],\"articleSection\":[\"API\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\",\"name\":\"How to Use Redis for API Caching in CS-Cart?\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\",\"datePublished\":\"2023-07-26T13:30:53+00:00\",\"dateModified\":\"2023-08-10T09:18:31+00:00\",\"description\":\"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png\",\"width\":654,\"height\":268,\"caption\":\"screenshot_1691572081492\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Redis for API Caching in CS-Cart?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/97d715f8b3484277df4f66e20d11a5ed\",\"name\":\"Prashant Bisht\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/461cd2edae22243f943bf09cb376ba109a0cdaf72da0374135fa6cf2566976ed?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/461cd2edae22243f943bf09cb376ba109a0cdaf72da0374135fa6cf2566976ed?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Prashant Bisht\"},\"description\":\"CS-Cart developer with expertise in SAAS and jQuery. He specializes in CS-Cart Payment and Shipping Integration Services, App Development, and React development. Prashant delivers innovative and efficient solutions that enhance e-commerce functionality and drive business growth.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/prashantbisht-cscart490\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Redis for API Caching in CS-Cart?","description":"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.","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:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Redis for API Caching in CS-Cart?","og_description":"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.","og_url":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-07-26T13:30:53+00:00","article_modified_time":"2023-08-10T09:18:31+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png","type":"","width":"","height":""}],"author":"Prashant Bisht","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Prashant Bisht","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/"},"author":{"name":"Prashant Bisht","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/97d715f8b3484277df4f66e20d11a5ed"},"headline":"How to Use Redis for API Caching in CS-Cart?","datePublished":"2023-07-26T13:30:53+00:00","dateModified":"2023-08-10T09:18:31+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/"},"wordCount":465,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png","keywords":["api","cscart","redis","redis cache"],"articleSection":["API"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/","url":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/","name":"How to Use Redis for API Caching in CS-Cart?","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png","datePublished":"2023-07-26T13:30:53+00:00","dateModified":"2023-08-10T09:18:31+00:00","description":"Discover how to use Redis for API caching in CS-Cart to optimize response times, reduce server load, and improve overall API performance.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/08\/screenshot_1691572081492.png","width":654,"height":268,"caption":"screenshot_1691572081492"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-api-caching-in-cs-cart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use Redis for API Caching in CS-Cart?"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/97d715f8b3484277df4f66e20d11a5ed","name":"Prashant Bisht","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/461cd2edae22243f943bf09cb376ba109a0cdaf72da0374135fa6cf2566976ed?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/461cd2edae22243f943bf09cb376ba109a0cdaf72da0374135fa6cf2566976ed?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Prashant Bisht"},"description":"CS-Cart developer with expertise in SAAS and jQuery. He specializes in CS-Cart Payment and Shipping Integration Services, App Development, and React development. Prashant delivers innovative and efficient solutions that enhance e-commerce functionality and drive business growth.","url":"https:\/\/webkul.com\/blog\/author\/prashantbisht-cscart490\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/392361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/480"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=392361"}],"version-history":[{"count":30,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/392361\/revisions"}],"predecessor-version":[{"id":395014,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/392361\/revisions\/395014"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=392361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=392361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=392361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}