PHPackages                             permafrost-dev/laravel-scriptcache - 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. permafrost-dev/laravel-scriptcache

AbandonedLibrary[Caching](/categories/caching)

permafrost-dev/laravel-scriptcache
==================================

Allows client-side scripts to leverage the server's laravel cache

1.0.0(6y ago)12MITPHPPHP ^7.2CI failing

Since Aug 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/permafrost-dev/laravel-scriptcache)[ Packagist](https://packagist.org/packages/permafrost-dev/laravel-scriptcache)[ Docs](https://github.com/permafrost-dev/laravel-scriptcache)[ RSS](/packages/permafrost-dev-laravel-scriptcache/feed)WikiDiscussions master Synced 3d ago

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

Laravel ScriptCache
-------------------

[](#laravel-scriptcache)

---

This package allows javascript to leverage the laravel cache and store small amounts of data for a limited amount of time, usually 60 seconds.

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

[](#installation)

You can install the package via composer:

```
composer require permafrost-dev/laravel-scriptcache
```

Usage
-----

[](#usage)

```
    async function setCachedData(value) {
        const token = await axios.get('/api/scriptcache?data=' + value);
        return token;
    }

    async function getCachedData(token) {
        const result = (await axios.get('/api/scriptcache/'+token));
        return result;
    }

    async function doSomeDataProcessing(dataStr) {
        const token = (await setCachedData(dataStr)).data;
        const cacheid = token.cache_id;

        const cachedDataObject = (await getCachedData(cacheid)).data;
        const cachedData = cachedDataObject.data;

        console.log('original data: ', dataStr);
        console.log('got cached data: ', cachedData);
    }

    //...cache expires after 60 seconds
```

### Notes

[](#notes)

---

The cached data is sanitized prior to storage, and the cache key used is tied to the requesting user to avoid access to other items in the cache.

### Testing

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity53

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

2468d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de8dcb8e8a47ddc1076a26721d1ce7b17e3066b53c4a5c5e9aa31367c1955a20?d=identicon)[permafrost-dev](/maintainers/permafrost-dev)

---

Tags

backendcachejavascriptlaravellaravel-packagelaraveljavascriptservercachescriptspermafrost

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/permafrost-dev-laravel-scriptcache/health.svg)

```
[![Health](https://phpackages.com/badges/permafrost-dev-laravel-scriptcache/health.svg)](https://phpackages.com/packages/permafrost-dev-laravel-scriptcache)
```

###  Alternatives

[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975163.6k2](/packages/awssat-laravel-visits)[swayok/alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea. Powered by cache pool implementations provided by http://www.php-cache.com/

202541.1k6](/packages/swayok-alternative-laravel-cache)[dragon-code/laravel-cache

An improved interface for working with cache

6844.8k10](/packages/dragon-code-laravel-cache)[nexxai/laravel-cfcache

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)[karriere/state

Laravel package for storing current application state in cache/session

1718.5k](/packages/karriere-state)[henzeb/laravel-cache-index

Flexible replacement for tags

1213.9k](/packages/henzeb-laravel-cache-index)

PHPackages © 2026

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