Idatabase redis3/13/2023 ![]() Now that we have a local server running, lets configure our application to use the cache to store and read data. However, because we don’t have any data currently being cached there is not much to see, so the next step is to hook up the application to cache some data. We can then use the redis-cli command to interact with our server. If we use the Dashboard and select the CLI option next to our running container, we will get a command line interface in our container. You can check the details for this by running the command docker ps or by opening the Docker Desktop Dashboard. The reason we use a password locally is so that we can implement the authentication method later and using different environment variables. Once this command has completed you will have a docker container running a simple Redis server with a password. Open a command prompt and use the following command to download the latest Redis image and create a new server with a development password: docker run -p 6379:6379 -name dev-redis-server -d redis -requirepass mylocalredispassword I will assume you already have Docker for Windows installed as this is relatively straight forward. However, to ensure compatibility and features in case we need them, let’s use Docker for Windows to run Redis in a container. The Setupīecause I am only looking at storing entities from Discord in the cache using a simple key/value pair we could use the version of Redis Microsoft used to maintain. NET core app) and my microservices (using Azure Functions) I can keep the messaging between the components light weight while still accessing data at a very performant speed. By adding a cache service like this inbetween the Discord Bot proxy service (a traditional. So recently I looked at how I can run Redis locally for the Discord Bot and move it into Azure when done. But, like most things, I like to develop locally and unpack they way something works without having to consume cloud services. Azure Cache for Redis is a cache layer, built on Redis, for better performance for consuming data, particularly reads.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |