Download the PHP package jonathan-neugber/cake-variable-cache without Composer

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

CakePHP 3 cake-variable-cache

Description

This plugin is designed to asynchronously execute calculations that take a long amount of time and save the results (e.g.: Statistics).

It allows you to create a simple list of variables that are to be calculated every n-amount of time.

It also supports dependent variables (e.g.: variable bar requires variable foo to be calculated first).

Installation

1. require the plugin in your composer.json

    "require": {
        ...
        "jonathan-neugber/cake-variable-cache": "dev-master",
        ...
    }

2. Include the plugin using composer

Open a terminal in your project-folder and run these commands:

$ composer update
$ composer install

3. Load the plugin in your config/bootstrap.php

Plugin::load('VariableCache', ['bootstrap' => true]);

4. Add configuration to your config/app.php

5. Migrations

Open a terminal in your project-folder and run this command:

$ bin/cake migrations migrate --source=../vendor/jonathan-neugber/cake-variable-cache/config/Migrations/

Usage / Example

1. Create a callback

Lets say you want to calculate a statistic:

2. Create a config

In the VariableCache.variables section of the configuration add the following:

3. Import the config

Open a terminal in your project-folder and run this command:

$ bin/cake VariableCache.CachedVariables update

This will create the cached variables in the Database.

4. Run the queues

Execute the following commands in parallel in a terminal in your project-folder and run this command:

$ bin/cake VariableCache.CachedVariables

and

$ bin/cake queuesadilla

5. Access the variable

OR

OR

Additional Information

DynamicCalculationTrait

The DynamicCalculationTrait allows you to easily create a library of callbacks for cached variables. Using DynamicCalculationTrait::calculate() as the callback will automatically call the function calculate<CachedVariableName> in the class.

Example:

Reset

This will reset all main cached variables so that a new execution is required.

$ bin/cake VariableCache.CachedVariables reset

TODO


All versions of cake-variable-cache with dependencies

PHP Build Version
Package Version
Requires cakephp/plugin-installer Version *
codekanzlei/cake-cktools Version 1.2.*
cakephp/cakephp Version ~3.4
josegonzalez/cakephp-queuesadilla Version *
php Version >=7.1
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 jonathan-neugber/cake-variable-cache contains the following files

Loading the files please wait ....