PHPackages                             orumad/lumen-config-cache - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. orumad/lumen-config-cache

ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

orumad/lumen-config-cache
=========================

Adds the Laravel command `php artisan config:cache` to Lumen

1.1.0(4y ago)1199.5k↑14.3%4[4 issues](https://github.com/danielmrdev/lumen-config-cache/issues)MITPHPPHP &gt;=7.0

Since Jul 25Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/danielmrdev/lumen-config-cache)[ Packagist](https://packagist.org/packages/orumad/lumen-config-cache)[ Docs](https://github.com/orumad/lumen-config-cache)[ RSS](/packages/orumad-lumen-config-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

lumen-config-cache
==================

[](#lumen-config-cache)

> **This repository is archived and no longer maintained.**Lumen itself is no longer recommended for new projects — use Laravel + Octane instead. Feel free to fork if you need to continue using this package.

[![Latest Version on Packagist](https://camo.githubusercontent.com/c37c2a07ef30b13cfbfe79db4f2773f9d72727a6e6b7e612e1b52c2b1e242b81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f72756d61642f6c756d656e2d636f6e6669672d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orumad/lumen-config-cache) [![Total Downloads](https://camo.githubusercontent.com/e84a4286796d108a85908d99b81fffa9e9c7c05b42b9add86ca945319d7a0918/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f72756d61642f6c756d656e2d636f6e6669672d63616368652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orumad/lumen-config-cache) [![License: MIT](https://camo.githubusercontent.com/458425f8985b0b0c8a736cffe75e05a098e3d77906acddbcad2bfc54492a4e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/orumad/lumen-config-cache)

Adds the Laravel artisan command `config:cache` to Lumen.

Once installed you can type `php artisan lumen-config:cache` in your console to gets all your Lumen configuration files loaded in the cache, which will increase your Lumen app response times.

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

[](#installation)

This package can be used in Laravel 5.4 or higher with PHP 7.0 or higher.

You can install the package via composer:

```
composer require orumad/lumen-config-cache
```

Now register the service provider in `bootstrap/app.php` file:

```
$app->register(Orumad\ConfigCache\ServiceProviders\ConfigCacheServiceProvider::class);
```

If you want to publish automatically the config file, you must install a package like [lumen-vendor-publish](https://github.com/laravelista/lumen-vendor-publish), which contains a single command that enables you to publish a package config file to the config folder of your Lumen application.

So you can publish the config file like in Laravel:

```
php artisan vendor:publish --tag="lumen-config-cache"
```

If you dedice to not install any aditional package, then you can copy the file `vendor/orumad/lumen-config-cache/src/config/config-cache.php` to your app `config` folder.

This is the contents of the published `config/config-cache.php` config file:

```
return [

    /**
     * The name of the key where the config is stored in cache
     */
    'cache_key' => 'config_cache',

    /**
     * Expiration time for the config in cache
     */
    'cache_expiration_time' => 60*24, // One day

    /**
     * The config files (app, database, queue, etc.) to be cached
     * Add to this array whatever config files you want to load in cache
     */
    'config_files' => [
        'app',
    ],

];
```

You should enable the use of facades in Lumen uncommenting the following line in your `bootstrap/app.php` file:

```
// $app->withFacades();
```

Usage
-----

[](#usage)

You can access your config keys with `ConfigCache::get` facade method:

```
use Orumad\ConfigCache\Facades\ConfigCache;

...

$api_url = ConfigCache::get('app.API_URL');
```

Also you can force the cached config to be refreshed with `ConfigCache::refresh` facade method:

```
use Orumad\ConfigCache\Facades\ConfigCache;

...

ConfigCache::refresh();
```

You can use the `artisan` command `lumen-config:cache` to force the cached configuration to be refreshed too.

**TIP: Add this command to your deployment script to be sure you have the last config cached after deploy your new app release:**

```
php artisan lumen-config:cache
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Daniel Muñoz](https://twitter.com/daniel_munoz_)
- [All contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance51

Moderate activity, may be stable

Popularity38

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~837 days

Total

3

Last Release

1544d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.1.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9031aae44312e0d3bdb635e3a51e922e5c3e5cda965a116db9280f6ad3f81aff?d=identicon)[danielmrdev](/maintainers/danielmrdev)

---

Top Contributors

[![howdu](https://avatars.githubusercontent.com/u/533658?v=4)](https://github.com/howdu "howdu (1 commits)")[![salamwaddah](https://avatars.githubusercontent.com/u/26627088?v=4)](https://github.com/salamwaddah "salamwaddah (1 commits)")

---

Tags

laravellumenorumadlumen-config-cachelaravel-6-packagelaravel-7-packagelaravel-8-package

### Embed Badge

![Health badge](/badges/orumad-lumen-config-cache/health.svg)

```
[![Health](https://phpackages.com/badges/orumad-lumen-config-cache/health.svg)](https://phpackages.com/packages/orumad-lumen-config-cache)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188402.3k6](/packages/kra8-laravel-snowflake)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)

PHPackages © 2026

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