PHPackages                             riste/repository - 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. riste/repository

ActiveLibrary[Caching](/categories/caching)

riste/repository
================

Allow you to easily cache laravel models and retrieve from laravel's cache by extending AbstractRepository

021PHP

Since Aug 14Pushed 9mo agoCompare

[ Source](https://github.com/DimitrievskiRiste/repository)[ Packagist](https://packagist.org/packages/riste/repository)[ RSS](/packages/riste-repository/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

INSTALLATION: composer require riste/repository:dev-main

Caching models, example:

class UserRepository extends AbstractRepository { private string $key = "\_users"; public function getKey():string { return $this-&gt;key; } public function setKey(string $key):void { $this-&gt;$key = $key; } }

Finally, if i want to save/update my current user eloquent model i will call:

$userRepo = new UserRepository(); $userModel = User::find(1); $userRepo-&gt;addOrUpdate($userModel, 1); // where second parameter is TTL cache in hours

// If i need to search trough cache i will call findMany method $userRepo-&gt;findMany(\["name" =&gt; "Riste"\]); // Will look through cache where column is name and value Riste in case insensitive and will return array items of eloquent models that matches name Riste.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance41

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ee50ec70c5802b40723a92240aa284ccb6d12d5362303acfad6a225201cd29d?d=identicon)[DimitrievskiRiste](/maintainers/DimitrievskiRiste)

---

Top Contributors

[![DimitrievskiRiste](https://avatars.githubusercontent.com/u/202017114?v=4)](https://github.com/DimitrievskiRiste "DimitrievskiRiste (3 commits)")

### Embed Badge

![Health badge](/badges/riste-repository/health.svg)

```
[![Health](https://phpackages.com/badges/riste-repository/health.svg)](https://phpackages.com/packages/riste-repository)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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