Download the PHP package amelia/rememberable without Composer

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

Rememberable, Laravel 5 query cache

Build Status

Rememberable is an Eloquent trait for Laravel 5.2+ that adds a transparent query cache to your models.

It works by simply remembering the SQL query that was used and storing the result. If the same query is attempted while the cache is persisted it will be retrieved from the store instead of hitting your database again.

Requirements

At current, you're required to be using Redis as your cache implementation.

This is planned to be changed in future, and pull requests are welcomed.

PHP 5.6+ is supported.

Note: This package will cause your increment/decrement operations on models that use it to fire the saved event afterwards. For most people, this should be of no concern, but to disable it, set protected static $interceptable = false.

Installation

Install using Composer, just as you would anything else.

composer require amelia/rememberable

The easiest way to get started with Eloquent is to create an abstract App\Model which you can extend your application models from. In this base model you can import the rememberable trait which will extend the same caching functionality to any queries you build off your model.

<?php

namespace App;

use Amelia\Rememberable\Rememberable;
use Illuminate\Database\Eloquent\Model as Eloquent;

abstract class Model extends Eloquent
{
    use Rememberable;

    /**
     * Remember _all_ queries on this model
     *
     * @var bool
     */
    protected static $rememberable = true;
}

Now, just ensure that your application models from this new App\Model instead of Eloquent.

Alternatively, you can simply apply the trait to each and every model you wish to use remember() on.

Usage

All queries are remembered automatically.

On update or delete, any query which contains the altered model will be removed from the cache.

This means that in almost all cases you can just set your base model to remember queries and forget about it.

Flushing

If you wish to flush the query cache manually, you can issue a Model::flush() command.

flush() takes cache tag arguments; the tags applied to every single query are the model's class name, the model's table name, and 'rememberable'.

So, to flush every query (say, during deployment, if you dont flush the entire cache), issue ::flush('rememberable') on any model in your application that uses rememberable.

Manual usage

Just like in watson/rememberable, you can use remember(int $minutes) on specific queries if you dont have $rememberable set to true on the model in use.

// Remember the number of users for an hour.
// remembers "select count(*) from users"
$users = User::remember(60)->count();

Credits

This package is under the MIT License.

It's a direct fork of watson/rememberable, with many added features.


All versions of rememberable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
laravel/framework Version ~5.2|~5.3
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 amelia/rememberable contains the following files

Loading the files please wait ...