Download the PHP package schoolpalm/cache-store without Composer

On this page you can find all versions of the php package schoolpalm/cache-store. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cache-store

CacheStore Logo

CacheStore โ€” Context-Aware Cache for Laravel

Latest Version Total Downloads PHP Version License Tests


CacheStore is a powerful, context-aware cache abstraction layer for Laravel applications. It goes beyond simple key-value storage by introducing multi-tenant, multi-school, and custom context scoping โ€” making it ideal for SaaS platforms, school management systems, and any application that needs isolated cache namespaces.

Features

Quick Start

Table of Contents

Installation

You can install the package via Composer:

Service Provider Discovery

Laravel will auto-discover the CacheStoreServiceProvider. If you have disabled package discovery, register it manually in config/app.php:

Facade

The CacheStore facade is also auto-discovered. If needed, register it manually:

Publishing Configuration

Configuration

The package configuration file config/cache-store.php is automatically merged with your application's config.

Configuration Options

Option Type Default Description
driver string 'file' Default cache driver
key_separator string ':' Separator for context key segments
prefix string 'schoolpalm' Global prefix for all cache keys
context.tenant bool true Enable tenant context scoping
context.school bool true Enable school context scoping
drivers.file.path string storage_path('framework/cache') File cache storage path
drivers.redis.connection string 'default' Redis connection name
drivers.database.table string 'cache_store' Database cache table name

Usage

Basic Cache Operations

Complex Data Types

Remember Pattern

Drivers

CacheStore ships with five built-in drivers, each optimized for different use cases:

Driver Class Backend Use Case
Array ArrayCacheDriver PHP memory Testing, local development
File FileCacheDriver File system Single-server, small apps
Database DatabaseCacheDriver SQL database Persistent, multi-server
Redis RedisCacheDriver Redis High-performance, distributed
Laravel LaravelCacheDriver Any Laravel store Bridge to existing cache

Using a Specific Driver

Writing a Custom Driver

Implement the CacheDriver contract to create your own driver:

Context-Aware Caching

The standout feature of CacheStore is context-aware caching โ€” automatically scoping cache keys by tenant, school, or any custom context.

How It Works

When you use a context, CacheStore prefixes your cache keys with context identifiers:

This ensures that the same key name in different contexts never collides.

Usage

Configuring Context

You can enable/disable context segments in the config:

When disabled, the corresponding context segment is omitted from the cache key.

Key Building Logic

The cache key is built using the following pattern:

Where:

Testing

CacheStore makes testing a breeze with its Array driver and shared test traits.

Running Tests

Test Traits

Use the CacheDriverBehaviour trait to run a comprehensive test suite against any driver:

This automatically tests:

Creating a Custom Driver Test

Note: Include tests/Support/cacheDriverTests.php in your test file to execute the shared test suite.

Driver Contract

All cache drivers must implement the SchoolPalm\CacheStore\Contracts\CacheDriver interface:

Serialization Behavior

Drivers handle serialization automatically via CacheSerializer:

Value Type Storage Format Retrieval
string Stored as-is Returned as string
int Stored as string Cast back to int
float Stored as string Cast back to float
bool PHP serialized (b:1; / b:0;) Unserialized to bool
array PHP serialized Unserialized to array
object PHP serialized Unserialized to original class
null Not stored Default value returned

Note: increment() and decrement() bypass serialization for raw numeric operations at the storage layer.

Requirements

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Development Setup

  1. Clone the repository
  2. Run composer install
  3. Run composer build to set up the testbench workbench
  4. Run composer test to execute tests

Code Style

This package follows the PSR-12 coding standard.

Security

Please see SECURITY for our security policy.

Credits

License

The MIT License (MIT). Please see License File for more information.


Built with โค๏ธ by SchoolPalm for the Laravel community


All versions of cache-store with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^12.0
illuminate/cache Version ^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package schoolpalm/cache-store contains the following files

Loading the files please wait ...