Posts

Showing posts from April, 2021

Cache-Control(Http Header)

 The Cache-Control HTTP header holds directives (instructions) for caching in both requests and responses. A given directive in a request does not mean the same directive should be in the response. Syntax: Caching directives have the following rules to be valid: Case-insensitive, but lowercase is recommended. Multiple directives are comma-separated. Some directives have an optional argument, which can be either a token or a quoted-string. (See spec for definitions) Cache request directives Standard Cache-Control directives that can be used by the client in an HTTP request. Cache-Control: max-age=<seconds> Cache-Control: max-stale[=<seconds>] Cache-Control: min-fresh=<seconds> Cache-Control: no-cache Cache-Control: no-store Cache-Control: no-transform Cache-Control: only-if-cached Cache response directives Standard Cache-Control directives that can be used by the server in an HTTP response. Cache-Control: must-revalidate Cache-Control: no-cache Cache-Control: no-store

Redis Cache DB setup with C#

Image
  Redis is a NoSQL key-value cache that stores the information in a hash table format, providing the possibilities to store different types of structured data like strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs Installing REDIS on Windows  Officially Redis doesn't have an official version for windows, but being an open-source project, there is a fork by MSOpenTech where there is the possibility of running Redis on Windows.  Requirements to install Redis: 64 bit OS The windows package manager Chocolatey In order to install Redis on Windows using Chocolatey, we need to run a simple command with the command prompt (as administrator) and just follow the instructions: C:\> choco install redis-64  Once the installation is complete, we can run the Redis server instance using the command redis-server.exe. If you have problems running the command and get the error "Redis-server is not recognized as an internal...etc" is because chocolatey failed registering

Redis - Cache DB Introduction

  Redis :  It stands for Remote Directory Server is an in-memory data structure store, used as a database, cache, and message broker. It is a disk-persistent key-value database with support for multiple data structures or data types Redis is an open source (BSD licensed), highly replicated, performant, non-relational kind of database and caching server. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, geospatial indexes, and streams.  Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. To achieve top performance, Redis w