How To Install libcache-fastmmap-perl on Debian 9

In this tutorial we learn how to install libcache-fastmmap-perl on Debian 9. libcache-fastmmap-perl is Perl module providing a mmaped cache

Introduction

In this tutorial we learn how to install libcache-fastmmap-perl on Debian 9.

What is libcache-fastmmap-perl

libcache-fastmmap-perl is:

Cache::FastMmap uses the mmap system call to establish an interprocess shared memory cache. Its core code is written in C, which can provide significant performance compared to a Pure Perl implementation such as Cache::Mmap. It can handle rather large pages without the socket connection and latency of using full-fledged databases where long-term persistence is unnecessary.

Since the algorithm uses a dual-level hashing system (a hash is used to find a page, then another hash within each page to find a given slot), most get calls can execute in constant O(1) time. The system uses fcntl to handle concurrent access, but only locks individual pages to reduce contention. The oldest (least recently used) data is evicted from the cache first, making this cache implementation most suitable for cases when old data is unlikely to be searched.

There are three methods to install libcache-fastmmap-perl on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libcache-fastmmap-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libcache-fastmmap-perl using apt-get by running the following command:

sudo apt-get -y install libcache-fastmmap-perl

Install libcache-fastmmap-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libcache-fastmmap-perl using apt by running the following command:

sudo apt -y install libcache-fastmmap-perl

Install libcache-fastmmap-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libcache-fastmmap-perl using aptitude by running the following command:

sudo aptitude -y install libcache-fastmmap-perl

How To Uninstall libcache-fastmmap-perl on Debian 9

To uninstall only the libcache-fastmmap-perl package we can use the following command:

sudo apt-get remove libcache-fastmmap-perl

Uninstall libcache-fastmmap-perl And Its Dependencies

To uninstall libcache-fastmmap-perl and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove libcache-fastmmap-perl

Remove libcache-fastmmap-perl Configurations and Data

To remove libcache-fastmmap-perl configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge libcache-fastmmap-perl

Remove libcache-fastmmap-perl configuration, data, and all of its dependencies

We can use the following command to remove libcache-fastmmap-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libcache-fastmmap-perl

Dependencies

libcache-fastmmap-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libcache-fastmmap-perl package on Debian 9 using different package management tools: apt, apt-get and aptitude.