PHPackages                             rah/rah\_memcached - 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. rah/rah\_memcached

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

rah/rah\_memcached
==================

Memcached Textpattern CMS templates

0.3.0(4y ago)2111GPL-2.0PHPPHP &gt;=8.1CI passing

Since Mar 19Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/gocom/rah_memcached)[ Packagist](https://packagist.org/packages/rah/rah_memcached)[ Docs](https://github.com/gocom/rah_memcached)[ Fund](https://www.paypal.me/jukkasvahn)[ RSS](/packages/rah-rah-memcached/feed)WikiDiscussions master Synced 3d ago

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

rah\_memcached
==============

[](#rah_memcached)

[Download](https://github.com/gocom/rah_memcached/releases) | [Packagist](https://packagist.org/packages/rah/rah_memcached) | [Issues](https://github.com/gocom/rah_memcached/issues)

A plugin for [Textpattern CMS](https://textpattern.com) that stores parts of your templates in [Memcached](https://memcached.org/), a distributed in-memory key-value caching system.

Install
-------

[](#install)

Using [Composer](https://getcomposer.org):

```
$ composer require rah/rah_memcached
```

Or [download](https://github.com/gocom/rah_memcached/releases) an installer package.

Basics
------

[](#basics)

The plugin, rah\_memcached, introduces a new container tag to Textpattern’s arsenal. The tag stores the wrapped content, and [variables](https://docs.textpattern.com/tags/variable) set within it, in Memcached’s in-memory storage.

```

```

On subsequent calls the resulting output markup and variables will be loaded from memory, skipping template parsing and code execution, speeding up your site and alleviating database load.

Requirements
------------

[](#requirements)

- Textpattern &gt;= 4.7.0.
- PHP &gt;= 8.1.0.
- [Memcached](https://secure.php.net/manual/en/book.memcached.php) PHP extension.
- [libmemcached](https://libmemcached.org/) client library.
- [Memcached](https://memcached.org/) server.

Configuration
-------------

[](#configuration)

Connected server can be configured through Textpattern’s `textpattern/config.php` file:

```
define('RAH_MEMCACHED_HOST', 'localhost');
define('RAH_MEMCACHED_PORT', 11211);
```

Attributes
----------

[](#attributes)

```

    ...contained statement...

```

The tag is a container and attributes for it follow.

**name**
Sets a name, a key, for the cached item. The given name is used identify the item, and save and fetch it from the storage. If a *name* is not defined, it’s automatically created by hashing the given contained markup. While the name is optional, giving it is more efficient and avoids any potential hash collisions.
Default: *undefined* Example: `name="mykey"`

**expires**
Time in seconds it takes to the stored item to expire and be refreshed. If zero (`0`), the cache is kept in memory until the cache is flushed or Memcached is restarted.
Default: `0` Example: `expires="3600"`

**persist**
If enabled, ignores content updates as set by site’s `lastmod` timestamp. By default, the cache is invalidated when Texptatern’s lastmod timestamp is updated, which is done when any content is updated.
Default: *disabled* Example: `persist`

Examples
--------

[](#examples)

### Store section navigation in memory

[](#store-section-navigation-in-memory)

```

```

### Store variables in memory

[](#store-variables-in-memory)

```

```

```
Color:
Size:
```

Changelog
---------

[](#changelog)

### Version 0.3.0 – 2022/04/22

[](#version-030--20220422)

- Fixes PHP &gt;= 8.1 compatibility.
- Now requires PHP &gt;= 8.1.

### Version 0.2.0 – 2022/04/17

[](#version-020--20220417)

- Register the tag for Textpattern &gt;= 4.7.0 compatibility.
- Replaced `lastmod` attribute with `persist`.
- Now requires PHP &gt;= 7.2.0.
- Now requires Textpattern &gt;= 4.7.0.

### Version 0.1.0 – 2014/03/19

[](#version-010--20140319)

- Initial release.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance40

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~1478 days

Total

3

Last Release

1483d ago

PHP version history (3 changes)0.1.0PHP &gt;=5.2.0

0.2.0PHP &gt;=7.2.0

0.3.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![gocom](https://avatars.githubusercontent.com/u/665186?v=4)](https://github.com/gocom "gocom (33 commits)")

---

Tags

memcachedphptextpatterntextpattern-pluginplugincachememorymemcachedtextpattern

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rah-rah-memcached/health.svg)

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

###  Alternatives

[cache/memcached-adapter

A PSR-6 cache implementation using Memcached. This implementation supports tags

161.9M14](/packages/cache-memcached-adapter)[ihor/cachalot

Cache a lot in a proper way (APC, XCache, Memcached, Redis, Couchbase)

2528.1k](/packages/ihor-cachalot)

PHPackages © 2026

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