PHPackages                             pessek/pessek\_stash - 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. pessek/pessek\_stash

ActiveElgg-plugin[Caching](/categories/caching)

pessek/pessek\_stash
====================

API for caching common counters to reduce DB queries

v4.0(4y ago)04proprietaryPHPPHP &gt;=7.4

Since Nov 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rheman/pessek_stash)[ Packagist](https://packagist.org/packages/pessek/pessek_stash)[ RSS](/packages/pessek-pessek-stash/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Pessek Stash
============

[](#pessek-stash)

[![Elgg 4.0](https://camo.githubusercontent.com/b1d01246e0107a41c37e5a81857f07c8eef37b85e910c4ff09f8bad002634eb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d342e302d677265656e2e737667)](https://camo.githubusercontent.com/b1d01246e0107a41c37e5a81857f07c8eef37b85e910c4ff09f8bad002634eb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d342e302d677265656e2e737667)

API for caching common entity data to reduce DB queries

- Caches entity likes count
- Caches entity comments count
- Caches last comment
- Caches user friends count
- Caches group members count

### Developer Notes

[](#developer-notes)

#### Logic

[](#logic)

The plugin uses preloader classes to load values from the database on first request. The value is cached and returned on consequent calls. `Preloader::up()` can be used to define when the cached value should be reset. For example, the value of likes is constant until a new like annotation is created, or an old is deleted, so we register our reset function for those events.

#### Helpers

[](#helpers)

You can use helper functions to retrieve counts using caching framework. All available shortcut functions can be found in `/lib/functions.php`

```
elgg_get_total_likes($entity);
elgg_get_total_comments($entity);
// etc.
```

#### Custom Properties

[](#custom-properties)

```
$stash = \hypeJunction\Stash\Stash::instance();

// Register a new cacheable property
$stash->register(new CustomProperty()); // Custom property must implement Preloader interface

// Get property value
$prop = $stash->get(CustomProperty::PROPERTY, $entity);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1644d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/649b17479d3b3a91bcdbbd05d56d9c55a33e095c8c4412ba6a34fa43bd3aff46?d=identicon)[rhemandaddy](/maintainers/rhemandaddy)

---

Tags

pluginelgg

### Embed Badge

![Health badge](/badges/pessek-pessek-stash/health.svg)

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

###  Alternatives

[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)

PHPackages © 2026

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