Download the PHP package uxmansarwar/cache without Composer

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

๐Ÿงฐ Laravel-Like Cache Wrapper for Core PHP

A fully-featured Laravel-style Cache Wrapper built in Core PHP using the power of Symfony's Cache component. This package provides an elegant and fluent caching API that mirrors Laravel's Cache facade, making it easy for developers to manage caching in procedural or object-oriented PHP applications outside of Laravel.


๐Ÿ“Œ Why This Package?

Laravel provides a very expressive and flexible API for caching, but it's deeply coupled with the Laravel framework. This package allows you to bring that elegant Laravel cache experience into any Core PHP project without requiring Laravel at all.

Built for:


๐Ÿง  Why a Wrapper?

Wrapping an existing library like Symfony's Cache component helps abstract complexity and create a clean, readable, Laravel-style API without reinventing the wheel. Symfony's cache is PSR-6/16 compliant and battle-tested in production, making it an excellent backend for this wrapper.


โš™๏ธ Requirements

Install Symfony Cache:


๐Ÿ“ฆ Installation

1. Clone or Require

If you're using Composer for your project:

If you're manually integrating:

Place src/Cache.php in your preferred directory and include it with Composer autoload.


๐Ÿงช Initialization

Before using the cache, initialize it:


๐Ÿ›  Full API Usage Examples

๐Ÿ” Get Value from Cache

๐Ÿ“ Put Value into Cache

โ™พ๏ธ Store Permanently

โ“ Check if Key Exists

โŒ Forget a Cache Key

๐Ÿงน Flush Entire Cache

๐Ÿฆ Remember (Lazy Load + Cache)

๐Ÿฆ Remember Forever

๐Ÿงช Pull and Delete

๐Ÿชฎ Add if Not Exists

๐Ÿ•พ๏ธ Increment a Value

๐Ÿ”พ Decrement a Value


๐Ÿงฑ Tests & Development Setup

Install Dev Dependencies

PestPHP Setup

This will create the tests/ directory and Pest.php bootstrap file.

PHPStan Setup

Create phpstan.neon:

Add Test Scripts to composer.json


๐Ÿ“š Example Pest Tests

File: tests/CacheTest.php


๐Ÿงฑ Directory Structure


๐ŸŽฏ Planned Features


๐Ÿง‘โ€๐Ÿ’ป Contribution

Pull requests and issues are welcome! Feel free to fork and improve. Please make sure to write tests and maintain existing code style.


๐Ÿ“œ License

This project is open-sourced under the MIT License.


โค๏ธ Credits

This wrapper is built using the power of Symfony Cache and inspired by Laravel's elegant Cache facade.


๐Ÿ™Œ Support

If this package helped you, consider โญ starring the repo and sharing it with your fellow PHP developers!


All versions of cache with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/cache Version ^7.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 uxmansarwar/cache contains the following files

Loading the files please wait ....