Download the PHP package julienlinard/php-cache without Composer

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

PHP Cache

🇬🇧 Read in English

💝 Support the project

If this package is useful to you, consider becoming a sponsor to support the development and maintenance of this open source project.


A modern and secure caching system for PHP 8+ with support for multiple drivers (File, Redis, Memcached, Array), tags, TTL, and invalidation.

🚀 Installation

Requirements: PHP 8.0 or higher

⚡ Quick Start

Basic Configuration

📋 Features

📖 Documentation

Available Drivers

Array Driver (Memory)

The Array driver stores data in memory. Useful for testing and development.

File Driver (Disk)

The File driver stores data in files on the filesystem.

Redis Driver

The Redis driver requires the PHP Redis extension.

Basic Operations

Store a Value

Retrieve a Value

Check Existence

Delete a Value

Clear All Cache

Multiple Operations

Retrieve Multiple Values

Store Multiple Values

Delete Multiple Keys

Increment and Decrement

Pull (Retrieve and Delete)

Using a Specific Driver

Tag System

Tags allow grouping cache entries and invalidating them together.

Advanced Usage with CacheManager

Key Validation

The system automatically validates keys for security:

Error Handling

🔒 Security

Implemented Security Measures

  1. Key Validation: Protection against path injections
  2. Secure Serialization: JSON usage with strict validation
  3. File Permissions: Permission control for File driver
  4. Atomic Writing: File driver uses temporary files to prevent corruption
  5. Input Validation: All entries are validated before storage

Best Practices

🧪 Tests

📝 Usage Examples

Database Query Caching

Cache with Tag Invalidation

View/Template Caching

Counter with Expiration

🤝 Integration with Other Packages

With doctrine-php

📚 API Reference

Cache (Facade)

CacheInterface

All drivers implement CacheInterface with the following methods:

🐛 Troubleshooting

File Driver Not Working

Check that the cache directory exists and is writable:

Redis Driver Not Connecting

  1. Check that Redis extension is installed: php -m | grep redis
  2. Check that Redis is running: redis-cli ping
  3. Check connection parameters in configuration

"Invalid Key" Error

Keys must follow this format:

📝 License

MIT License - See the LICENSE file for more details.

🤝 Contributing

Contributions are welcome! Feel free to open an issue or a pull request.

📧 Support

For any questions or issues, please open an issue on GitHub.

💝 Support the project

If this package is useful to you, consider becoming a sponsor to support the development and maintenance of this open source project.


Developed with ❤️ by Julien Linard


All versions of php-cache with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
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 julienlinard/php-cache contains the following files

Loading the files please wait ...