PHPackages                             momentohq/laravel-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. momentohq/laravel-cache

ActiveLibrary[Caching](/categories/caching)

momentohq/laravel-cache
=======================

Taggable Momento cache driver for Laravel.

v1.1.4(2y ago)11181[1 PRs](https://github.com/momentohq/laravel-cache/pulls)1Apache-2.0PHP

Since Nov 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/momentohq/laravel-cache)[ Packagist](https://packagist.org/packages/momentohq/laravel-cache)[ Docs](https://github.com/momentohq/laravel-cache)[ RSS](/packages/momentohq-laravel-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (40)Used By (1)

[![logo](https://camo.githubusercontent.com/360a9d3e7faa618e55deff1ab31e825f62c35ef7fe7e295751a90634d235549a/68747470733a2f2f646f63732e6d6f6d656e746f68712e636f6d2f696d672f6d6f6d656e746f2d6c6f676f2d666f726573742e737667)](https://camo.githubusercontent.com/360a9d3e7faa618e55deff1ab31e825f62c35ef7fe7e295751a90634d235549a/68747470733a2f2f646f63732e6d6f6d656e746f68712e636f6d2f696d672f6d6f6d656e746f2d6c6f676f2d666f726573742e737667)

[![project status](https://camo.githubusercontent.com/b2d6521a8be08d2d9b3c134c86cd02a1403d7958e4f55b95e6304180c51ac939/68747470733a2f2f6d6f6d656e746f68712e6769746875622e696f2f7374616e64617264732d616e642d7072616374696365732f6261646765732f70726f6a6563742d7374617475732d6f6666696369616c2e737667)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md)[![project stability](https://camo.githubusercontent.com/0020efdec2bed8965e11d3e2b22a742b673fd693d4494bf7beab64f00bb6a0c7/68747470733a2f2f6d6f6d656e746f68712e6769746875622e696f2f7374616e64617264732d616e642d7072616374696365732f6261646765732f70726f6a6563742d73746162696c6974792d737461626c652e737667)](https://github.com/momentohq/standards-and-practices/blob/main/docs/momento-on-github.md)

Getting Started 🏃
-----------------

[](#getting-started-running)

### Requirements

[](#requirements)

- A Momento API Key is required, you can generate one using the [Momento Console](https://console.gomomento.com)
- A Momento cache is required, you can generate one using the [Momento Console](https://console.gomomento.com/create)
- At least PHP 8.0
- [Composer](https://getcomposer.org/doc/00-intro.md)
- At least [Laravel 9.x](https://laravel.com/docs/9.x/installation)
- The grpc PHP extension. See the [gRPC docs](https://github.com/grpc/grpc/blob/v1.46.3/src/php/README.md) section on installing the extension.

**IDE Notes**: You'll most likely want to use an IDE that supports PHP development, such as [PhpStorm](https://www.jetbrains.com/phpstorm/) or [Microsoft Visual Studio Code](https://code.visualstudio.com/).

### Examples

[](#examples)

Check out full working code in [the example app](https://github.com/momentohq/laravel-example)!

### Installation

[](#installation)

Add our SDK as a dependency to your Laravel installation's `composer.json` file:

```
{
  "require": {
    "momentohq/laravel-cache": "1.1.4"
  }
}
```

Run `composer update` to install the necessary prerequisites.

Then, add `MomentoServiceProvider` to your `config/app.php`:

```
'providers' => [
    // ...
    Momento\Cache\MomentoServiceProvider::class
];
```

And add:

- `MOMENTO_API_KEY`=&lt;YOUR\_API\_KEY&gt;
- `MOMENTO_CACHE_NAME`=&lt;CACHE\_CREATED\_ABOVE&gt;

into your `.env` file

Finally, add the required config to your `config/cache.php`:

```
'default' => env('CACHE_DRIVER', 'momento'),

'stores' => [
        'momento' => [
            'driver' => 'momento',
            'cache_name' => env('MOMENTO_CACHE_NAME'),
            'default_ttl' => 60,
        ],
],
```

Run `composer update` to install the necessary prerequisites.

### Usage

[](#usage)

Check out full working code in [the example app](https://github.com/momentohq/laravel-example)!

### Tuning

[](#tuning)

Coming soon!

### Tag Support

[](#tag-support)

Cache tags work the same way as explained in the Laravel [documentation](https://laravel.com/docs/9.x/cache#cache-tags).

**Notes**: If a tag may contain more than 4MB worth of keys, tagging may not work as intended. Please contact us at  or on our [Discord](https://discord.com/invite/3HkAKjUZGq) if you need support for a larger tag set.

### Unsupported Cache Operations

[](#unsupported-cache-operations)

The following cache operations are not supported today. If you need these operations, please reach out to us, and we can prioritize the work to complete them. You can file a GitHub issue, e-mail us at , or join our [Discord](https://discord.com/invite/3HkAKjUZGq).

- `forever`

---

For more info, visit our website at !

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~5 days

Total

18

Last Release

746d ago

Major Versions

v0.2.1 → v1.0.02023-03-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/481f82d9851a8348e7e2f289443d2a73f245a9596ad01aa8898fd015d2db9a0b?d=identicon)[momento](/maintainers/momento)

---

Top Contributors

[![rishtigupta](https://avatars.githubusercontent.com/u/127137312?v=4)](https://github.com/rishtigupta "rishtigupta (14 commits)")[![pgautier404](https://avatars.githubusercontent.com/u/5394199?v=4)](https://github.com/pgautier404 "pgautier404 (13 commits)")[![poppoerika](https://avatars.githubusercontent.com/u/22686260?v=4)](https://github.com/poppoerika "poppoerika (11 commits)")[![momento-github-actions-machine-user](https://avatars.githubusercontent.com/u/87725926?v=4)](https://github.com/momento-github-actions-machine-user "momento-github-actions-machine-user (8 commits)")[![cprice404](https://avatars.githubusercontent.com/u/1341071?v=4)](https://github.com/cprice404 "cprice404 (4 commits)")[![anitarua](https://avatars.githubusercontent.com/u/138700973?v=4)](https://github.com/anitarua "anitarua (2 commits)")

---

Tags

cachecachingserverless

### Embed Badge

![Health badge](/badges/momentohq-laravel-cache/health.svg)

```
[![Health](https://phpackages.com/badges/momentohq-laravel-cache/health.svg)](https://phpackages.com/packages/momentohq-laravel-cache)
```

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k727.3M2.1k](/packages/psr-simple-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[tedivm/stash

The place to keep your cache.

9824.8M124](/packages/tedivm-stash)[spatie/blink

Cache that expires in the blink of an eye

1685.0M8](/packages/spatie-blink)[gregwar/cache

A lightweight file-system cache system

1084.5M22](/packages/gregwar-cache)[putyourlightson/craft-blitz

Intelligent static page caching for creating lightning-fast sites.

153471.5k29](/packages/putyourlightson-craft-blitz)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
