PHPackages                             bach-pedersen/laravel-riak - 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. bach-pedersen/laravel-riak

AbandonedArchivedLibrary[Caching](/categories/caching)

bach-pedersen/laravel-riak
==========================

Riak providers for Riak Connection, Cache and Session

1.1.3(11y ago)33842[1 issues](https://github.com/TriKaspar/laravel-riak/issues)Apache-2.0PHPPHP &gt;=5.4.0

Since Nov 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/TriKaspar/laravel-riak)[ Packagist](https://packagist.org/packages/bach-pedersen/laravel-riak)[ RSS](/packages/bach-pedersen-laravel-riak/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (8)Used By (0)

[![Build Status](https://camo.githubusercontent.com/574974fb0cc6f0f70ccbfdc85db7c77c049f9bbdb3f44f56bfb9e05021972634/68747470733a2f2f7472617669732d63692e6f72672f5472694b61737061722f6c61726176656c2d7269616b2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/TriKaspar/laravel-riak)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/5aa1732762b673cd0fb5be41b6adb8d839127e5470b0b9365bdff280808c755e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5472694b61737061722f6c61726176656c2d7269616b2f6261646765732f7175616c6974792d73636f72652e706e673f733d62393134646533303431643332363435326239613535643939323331363534623763653133323562)](https://scrutinizer-ci.com/g/TriKaspar/laravel-riak/)\#laravel-riak
Simple Riak provider for Laravel.

\##Requirements
This provider is built on top of php\_riak so it of cause requires then php\_riak extension to be installed.
Installation instructions can be found here

\##Installation
Add bach-pedersen/laravel-riak to your composer.json like this:

```
"require": {
    "bach-pedersen/laravel-riak": "1.1.0"
}
```

\##Configuration
Host and port name for Riak should be configured in your app/config/database.php like this:

```
/*
    |--------------------------------------------------------------------------
    | Riak Database
    |--------------------------------------------------------------------------
    */
    'riak' => array(
        'host' => 'localhost',
        'port' => 8087
    )
```

Remember php-riak uses riak protobuf interface and not the http interface, default port is 8087.

Also the service provider should be registered in your app/config/app.php file, like this:

```
/*
// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\RiakServiceProvider',
),
```

\##Usage
To get a Riak\\Connection, simply ask the app for the instance.

```
/** @var $riak \Riak\Connection */
$riak = $this->app['riak'];

// or
/** @var $riak \Riak\Connection */
$riak = App::make('riak');
```

\##Cache provider There is also a caching provider included that can be activated if desired.
To activate the caching provider, make sure the normal Riak provider is configured like above, and then do the following:
1: Add provider in app

```
// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\Cache\RiakCacheServiceProvider',
        ...
),
```

2: Change the default cache driver and set the name of the bucket where you want the cache to be stored, like this:

```
// File: app/config/cache.php
    ...
	'driver' => 'riak',
	'bucket' => 'laravel.cache',
    ...
```

\##Session provider The session provider is built on top of the cache provider so both that and the regular riak provider should be added in app.php
Beside that the session provider should be added like this:

```
// File: app/config/app.php
'providers' => array(
        ...
        'BachPedersen\LaravelRiak\Session\RiakSessionServiceProvider',
),
```

And the same way as the cache provider the following settings should set in session.php

```
// File: app/config/session.php
    ...
	'driver' => 'riak',
	'bucket' => 'laravel.session',
    ...
```

Riak configuration
------------------

[](#riak-configuration)

1: The session and cache provider uses secondary indicies which means riak must be configured with eleveldb backend.
See  for more info.
2: Bucket properties for cache and session should have lastWriteWins=false and allowMult=false, there are commands included to do that automatically, just run cache:bucket:init and session:bucket:init and they will be set up correctly.

```
php artisan cache:bucket:init
php artisan session:bucket:init
```

\##Links
composer homepage:
php\_riak pecl page:
php\_riak source: [https://github.com/TriKaspar/php\_riak](https://github.com/TriKaspar/php_riak)
php\_riak documentation:

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~67 days

Total

7

Last Release

4315d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.1.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/11afe4ae2ef678434faf0ab4b2b5faa8c52a6976e3837b1eb07927035d726c1e?d=identicon)[kasparp](/maintainers/kasparp)

---

Tags

laravelcachesessionriak

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bach-pedersen-laravel-riak/health.svg)

```
[![Health](https://phpackages.com/badges/bach-pedersen-laravel-riak/health.svg)](https://phpackages.com/packages/bach-pedersen-laravel-riak)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[laravel/ai

The official AI SDK for Laravel.

9782.1M162](/packages/laravel-ai)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k55.1k1](/packages/mike-bronner-laravel-model-caching)[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

2119.7k](/packages/iazaran-smart-cache)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

13011.9k](/packages/nexxai-laravel-cfcache)

PHPackages © 2026

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