Download the PHP package ulex/cached-repositories without Composer

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

Centralize and cache you application's queries

Documentation, Installation, and Usage Instructions

First, install the package via Composer:


Service Provider

For Laravel

You should publish the RepositoriesServiceProvider:

Optional: The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file: Laravel

For Lumen

In your bootstrap/app.php:

  1. Register the provider

  2. Register config

Config

If config file cached-repositories.php was not published copy it to config folder with:

Create Repository, Interface, Decorator for a Model

Run the following php artisan command where the argument is your Model name (example Post):

Expected Result:

The following folders will be created in your app/Repositories folder (if they don't exist):

As seen in the result remember to add the Model in config/cached-repositories.php :

How to use

This package provides an abstract structure that uses the Repository design pattern with caching decorators for you application.

Once installed you can create Repositories for your models that cache the data from your queries. EloquentRepository is provided and ready to use. Follow the same principle for any data resource you have on your application.

Extending a model's CachingDecorator

For GET functions use remember function the same way as in the abstract CachingDecorator. This will ensure that this function is cached properly.

UserCachingDecorator.php

Note: Remember to add the cache invalidation of the new function by extending flushGetKeys in the model's CachingDecorator.

UserRepository.php

Add the query in the model's repository

Contributing

This package is mostly based on Jeffrey Way's awesome Laracasts lessons when using the repository design pattern on Laravel From Scratch series.

License

The MIT License (MIT). Please see License File for more information.


All versions of cached-repositories with dependencies

PHP Build Version
Package Version
Requires php 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 ulex/cached-repositories contains the following files

Loading the files please wait ....