PHPackages                             ugiw/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. ugiw/lumen-config-cache

ActiveLibrary

ugiw/lumen-config-cache
=======================

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

1.0.0(5y ago)05.6kMITPHPPHP ^7.0

Since Sep 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/andangdev/config-cache)[ Packagist](https://packagist.org/packages/ugiw/lumen-config-cache)[ Docs](https://github.com/andangsugiana/lumen-config-cache)[ RSS](/packages/ugiw-lumen-config-cache/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

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

[](#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 lumen 7 or higher with PHP 7.0 or higher.

You can install the package via composer:

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

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

```
$app->register(Ugiw\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/gipro/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 Ugiw\ConfigCache\Facades\ConfigCache;

...

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

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

```
use Ugiw\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
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2048d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13136bc70cd1106c298443c434941a0004152fea26a70f213b4b63044d45280f?d=identicon)[andang](/maintainers/andang)

---

Top Contributors

[![andangsugiana](https://avatars.githubusercontent.com/u/9659925?v=4)](https://github.com/andangsugiana "andangsugiana (1 commits)")

---

Tags

laravellumen-packagelumen-config-cacheUgiw

### Embed Badge

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

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

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[orumad/lumen-config-cache

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

1199.5k](/packages/orumad-lumen-config-cache)

PHPackages © 2026

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