Download the PHP package andydefer/jsonl-cache without Composer

On this page you can find all versions of the php package andydefer/jsonl-cache. 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 jsonl-cache

JSONL Cache

Un système de cache persistant compatible PSR-16 basé sur des fichiers JSONL pour PHP 8.1+

PHP Version Laravel Version


Table des matières

  1. Introduction
  2. Installation
  3. Configuration
  4. Concepts fondamentaux
  5. Utilisation de base
  6. Opérations avancées
  7. Gestion du TTL
  8. Intégration Laravel
  9. Tests
  10. Architecture technique
  11. Référence technique
  12. Licence

Introduction

Le problème

Les caches traditionnels (Redis, Memcached, APC) sont performants mais nécessitent :

La solution : JSONL Cache

JSONL Cache est un système de cache persistant basé sur des fichiers JSONL (JSON Lines), compatible avec l'interface PSR-16 (Common Interface for Caching Libraries).

Problème Solution JSONL Cache
Dépendance à Redis/Memcached Stockage fichiers - 100% PHP
Configuration complexe Zéro configuration, prêt à l'emploi
Perte de données au redémarrage Persistance automatique
Pas de TTL natif Support complet du Time To Live
Interface propriétaire PSR-16 : changez de driver sans modifier votre code

Installation

Pour Laravel, le package s'enregistre automatiquement via son Service Provider.

Publication de la configuration (Laravel)


Configuration

Fichier de configuration

Variables d'environnement


Concepts fondamentaux

Une entrée = un fichier JSONL

Structure d'un fichier cache

Organisation par hash MD5

Niveau Description Exemple
1 Premier caractère du MD5 e
2 Second caractère du MD5 1
Fichier Clé nettoyée user_123.jsonl

Pourquoi ? Éviter d'avoir trop de fichiers dans un même répertoire (limites du système de fichiers).


Utilisation de base

Instanciation du service

Sans Laravel :

Avec Laravel :

Stocker une valeur

Lire une valeur

Supprimer une valeur

Types de valeurs supportés


Opérations avancées

Opérations par lots (Multiple)

Accès aux données brutes

Écrasement automatique

La méthode set() écrase automatiquement la valeur existante :


Gestion du TTL

Différents formats de TTL

Comportement de l'expiration

TTL par défaut

La configuration default_ttl s'applique automatiquement :


Intégration Laravel

Service Provider

Le package enregistre automatiquement :

Exemple dans un contrôleur

Exemple dans un service


Tests

Tester le cache


Architecture technique

Composants principaux

Composant Rôle
JsonlCacheService Service principal (implémentation PSR-16)
CachePathStrategy Stratégie de chemin (organisation par hash MD5)
CacheRecord DTO des données de cache
JsonlService Service de lecture/écriture JSONL (package laravel-jsonl)
JsonlCacheConfig Wrapper de configuration
JsonlCacheInterface Interface PSR-16 étendue

Dépendances

Flux d'exécution (set)

Flux d'exécution (get)


Référence technique

Services

Service Description Documentation
JsonlCacheService Service principal PSR-16 Voir référence

Stratégies

Stratégie Description Documentation
CachePathStrategy Organisation par hash MD5 Voir référence

Interfaces

Interface Description Documentation
JsonlCacheInterface PSR-16 + méthodes additionnelles Voir référence

Licence

MIT © Andy Defer


All versions of jsonl-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^12.0|^13.0|^14.0|^15.0
andydefer/laravel-jsonl Version ^0.8.17
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 andydefer/jsonl-cache contains the following files

Loading the files please wait ...