Download the PHP package cmatosbc/mnemosyne without Composer

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

Mnemosyne - PHP Attribute-based Caching Library

PHP Lint PHPUnit Tests PHP Composer

Mnemosyne is a powerful and flexible caching library for PHP 8.0+ that uses attributes to simplify cache management. It provides automatic caching and invalidation based on method attributes, making it easy to add caching to your application.

Features

Installation

Usage

To use Mnemosyne in your classes, you must:

  1. Use the CacheTrait in your class
  2. Inject a PSR-16 compatible cache implementation
  3. Apply the Cache attribute to methods you want to cache

Basic Usage

Serialization Control

The Cache attribute allows you to control how values are stored in cache:

Custom Cache Keys

Cache Invalidation

Automatic Invalidation

Manual Invalidation

Cache Tags

Cache tags allow you to group related cache entries and invalidate them together. This is useful for managing cache dependencies and bulk invalidation.

Tags support parameter interpolation just like cache keys, allowing you to create dynamic tag names. When a tag is invalidated, all cache entries associated with that tag are automatically removed.

Best Practices

  1. Split cached methods into two parts:

    • A public method with the Cache attribute that handles caching
    • A private method with the actual implementation
  2. Use meaningful cache keys that reflect the data structure
  3. Set appropriate TTL values based on data volatility
  4. Use cache invalidation when data is modified
  5. Consider using cache tags for group invalidation

Testing

The library includes comprehensive PHPUnit tests. Run them with:

License

This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details. This means you are free to use, modify, and distribute this software, but any modifications must also be released under the GPL-3.0-or-later license.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


All versions of mnemosyne with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/simple-cache Version 3.0.0
psr/cache Version 3.0.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 cmatosbc/mnemosyne contains the following files

Loading the files please wait ....