Caching – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Wed, 15 Jun 2022 08:38:57 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Clear the ASP.NET Temporary files in Windows https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/ https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/#respond Wed, 15 Jun 2022 08:34:14 +0000 https://tecadmin.net/?p=30063 Sometimes you may notice a strange caching behavior by the applications running in IIS. Today I found that my ASP.NET application showed a blank page. It is hosted on Windows Server 2019 in Azure Platform. I tried multiple times to resolve the issue but did not get success. After searching about the issue, I found [...]

The post How to Clear the ASP.NET Temporary files in Windows appeared first on TecAdmin.

]]>
Sometimes you may notice a strange caching behavior by the applications running in IIS. Today I found that my ASP.NET application showed a blank page. It is hosted on Windows Server 2019 in Azure Platform. I tried multiple times to resolve the issue but did not get success.

After searching about the issue, I found a suggestion in Google search to remove all ASP.NET temporary files. Once I removed all the temporary files, the application start working again.

Remove ASP.NET Temp Files in Windows

To clear the temporary files do the following on both the Web Server:

  1. Log in to the server and open IIS.
  2. Stop IIS service. Run “iisreset /stop” in the command prompt to stop the IIS service.
  3. Navigate to the below directories:
    • “C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\”
    • “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\”
  4. Remove all files under both directoires.
  5. Start IIS service. Run “iisreset /start” in the command prompt to stop the IIS service.

Wrap Up

Even you can remove the temporary file without stopping the IIS server. Hope this tutorial helps you to resolve the caching-related issue on your Windows server.

The post How to Clear the ASP.NET Temporary files in Windows appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-clear-the-asp-net-temporary-files-in-windows/feed/ 0
How To Install Redis on Debian 10 https://tecadmin.net/how-to-install-redis-on-debian-10/ https://tecadmin.net/how-to-install-redis-on-debian-10/#respond Tue, 07 Jul 2020 14:04:56 +0000 https://tecadmin.net/?p=21829 Redis is an in-memory data structure store, used as a database server, cache, and message broker. Redis is written in C programming language. It also provides a PHP module for communication between PHP script with the Redis server.This tutorial will help you to install Redis server on Debian 10 Linux system. This will also help [...]

The post How To Install Redis on Debian 10 appeared first on TecAdmin.

]]>
Redis is an in-memory data structure store, used as a database server, cache, and message broker. Redis is written in C programming language. It also provides a PHP module for communication between PHP script with the Redis server.This tutorial will help you to install Redis server on Debian 10 Linux system. This will also help you to install Redis PHP extensions on your system.

Prerequisites

You must have shell access with sudo privileged account access to Debian 10 system. First of all, Login to your system and upgrade the current packages.

sudo apt update && sudo apt upgrade

Step 1 – Install Redis on Debian 10

Redis packages are available under the default apt repository. You can directly install Redis on Debian 10 system without adding any PPA. Run the following command to install Redis on Debian:

sudo apt install redis-server

After installation, enable Redis service to start on system boot.

sudo systemctl enable redis-server

Step 2 – Configure Memory for Redis

Redis can be started without a configuration file using a built-in default configuration. But to make any extra parameter changes you can use its configuration file that is: /etc/redis/redis.conf. Edit the Redis configuration file in a text editor to make changes

sudo vim /etc/redis/redis.conf

Update the following values in Redis configuration file according to your requirement. You can increase max memory limit as per available on your server.

maxmemory 256mb
maxmemory-policy allkeys-lru

The above configuration tells Redis to remove any key using the LRU algorithm when the max memory of 256mb is reached. Save the configuration file and restart the Redis service:

sudo systemctl restart redis-server

Step 3 – Install Redis PHP Extension

This is an optional step. If you need to connect Redis from PHP application, You need to install Redis PHP extension on your Debian system. To install Redis PHP extension, simply type:

sudo apt install php-redis

The installer will automatically enable redis extension for all the pre installed PHP versions. If you installer new PHP version after this, you can use below command to enable redis module. For example to enable extension for PHP 7.4, type:

sudo phpenmod -v 7.4 -s ALL redis

Step 4 – Connect to Redis Server

Use redis-cli tool to verify the connection between the Redis server.

redis-cli

127.0.0.1:6379> ping
PONG

Few more examples of redis-cli command line tool. You can find more details about redis-cli here.

redis-cli info
redis-cli info stats
redis-cli info server

How to Install Redis on Debian 10

Conclusion

This tutorial helps you with the installation of Redis server on Debian 10 system.

The post How To Install Redis on Debian 10 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-redis-on-debian-10/feed/ 0