Download the PHP package momentohq/drupal-cache without Composer

On this page you can find all versions of the php package momentohq/drupal-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupal-cache

Momento Cache Backend For Drupal

Prerequisites

A Momento API Token is required. You can generate one using the Momento Console.

The Momento Cache module uses Momento's PHP SDK internally. While installing the Drupal module will automatically install the SDK for you. Separately, you will need to install and enable the following extensions:

  1. The PHP gRPC extension for the SDK to function.
  2. The C Protobuf extension for PHP.

A Momento cache is required to handle Drupal's caching requests. You can create a cache in the Momento Console.

Drupal and Momento Rate Limiting

Momento's free tier limits accounts' transactions per second (TPS) and throughput (KiBps), and requests that exceed those limits are throttled. While the default limits are fine for exploring and developing with the Momento integration, Drupal's usage of the cache backend can be significantly higher than the default throttling limits under load. Prior to using the integration in a high-traffic or production environment, please reach out to [email protected] to raise your account limits. You can check the Drupal dblog and/or the logfile you configure in the settings (instructions below) for rate limiting error messages.

Installation and Configuration

Add the module with composer require 'momentohq/drupal-cache:0.5.2'.

Enable the momento_cache module in your Drupal administrator interface or using drush en momento_cache.

Add the following to your settings.php file:

Replace <YOUR_MOMENTO_TOKEN> with the token you generated in the console. You may also use an environment variable named MOMENTO_API_TOKEN to pass your API token to the Momento cache backend. If both are supplied, the settings file takes precedence.

Replace <YOUR_CACHE_NAME> with the name of your existing Momento cache. You may also use an environment variable named MOMENTO_CACHE_NAME to pass this value. If both are supplied, the settings file takes precedence. You must create the cache before using the module. If the cache doesn't exist, errors are written to the Drupal dblog as well as the logfile configured in your settings, if you have specified one.

Replace <YOUR_LOG_FILE_PATH> with the path of a file writable by your Drupal server or with null if you want to suppress logging. This logfile is used for logging and timing requests as they are handled by the module. Please be aware that this file will grow quickly over time, so if you choose to enable it long-term, you should probably use logrotate or some similar utility to keep it from growing out of control.

The example above uses Momento for all Drupal caches. If you prefer to use Momento for specific cache bins, you may assign them individually as well: $settings['cache']['bins']['render'] = 'cache.backend.momento_cache'


All versions of drupal-cache with dependencies

PHP Build Version
Package Version
Requires momentohq/client-sdk-php Version 1.7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package momentohq/drupal-cache contains the following files

Loading the files please wait ....