PHPackages                             assisted-mindfulness/memento - 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. assisted-mindfulness/memento

AbandonedLibrary[Caching](/categories/caching)

assisted-mindfulness/memento
============================

Easy cache store for only stores the result within a single request or job

3.0.0(2y ago)7198.3kMITPHPPHP ^8.1CI failing

Since Oct 22Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/esplora/memento)[ Packagist](https://packagist.org/packages/assisted-mindfulness/memento)[ RSS](/packages/assisted-mindfulness-memento/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

[![Memento](.github/logo.svg?sanitize=true)](.github/logo.svg?sanitize=true) Memento
====================================================================================

[](#-memento)

[![Tests](https://github.com/esplora/memento/actions/workflows/phpunit.yml/badge.svg)](https://github.com/esplora/memento/actions/workflows/phpunit.yml)

**Memento** is a small package that stores the result of a function or operation within a single HTTP request or job.

The package adds a new cache stored in the container instance, which avoids the need to use a [Laravel Cache](https://laravel.com/docs/cache#introduction) with access to the file system or fast storage like Redis when the result only needs to be stored for a short time.

Installation
------------

[](#installation)

You can install Memento in your project using the Composer package manager:

```
composer require esplora/memento
```

Usage
-----

[](#usage)

The simplest way to use Memento is with the provided helper function:

```
memento('users', function() {
  return DB::table('users')->get();
});
```

This function will return the result of the provided closure on the first call, and any subsequent calls within the same HTTP request or job will return the same result. The cache will be automatically flushed after the request or job is completed.

Flushing the Cache
------------------

[](#flushing-the-cache)

To flush the entire Memento cache, you can use the following code:

```
use Esplora\Memento\Memento;

Memento::flush();
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

↑

FairBetter than 89% of packages

Maintenance47

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

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 ~286 days

Total

3

Last Release

1093d ago

Major Versions

1.0.0 → 2.0.02022-03-07

2.0.0 → 3.0.02023-05-18

PHP version history (3 changes)1.0.0PHP ^7.4|^8.0

2.0.0PHP ^8.0

3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c47797b11041f37c2eec74b09bc6619c8997467d690797ebad0e6ab7cb232b7?d=identicon)[tabuna](/maintainers/tabuna)

---

Top Contributors

[![tabuna](https://avatars.githubusercontent.com/u/5102591?v=4)](https://github.com/tabuna "tabuna (18 commits)")[![SadElephant](https://avatars.githubusercontent.com/u/7434276?v=4)](https://github.com/SadElephant "SadElephant (2 commits)")

---

Tags

cachehacktoberfestlaravelphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/assisted-mindfulness-memento/health.svg)

```
[![Health](https://phpackages.com/badges/assisted-mindfulness-memento/health.svg)](https://phpackages.com/packages/assisted-mindfulness-memento)
```

###  Alternatives

[imanghafoori/laravel-widgetize

A minimal yet powerful package to give a better structure and caching opportunity for your Laravel apps.

909137.9k12](/packages/imanghafoori-laravel-widgetize)[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202541.1k6](/packages/swayok-alternative-laravel-cache)[alexmg86/laravel-sub-query

Laravel subquery

7538.4k](/packages/alexmg86-laravel-sub-query)[laravel-enso/rememberable

Model caching dependency for Laravel Enso

2863.2k25](/packages/laravel-enso-rememberable)[byerikas/cache-tags

Allows for Redis/Valkey cache flushing multiple tagged items by a single tag.

1413.9k](/packages/byerikas-cache-tags)

PHPackages © 2026

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