Download the PHP package oopress/caching without Composer

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

Oopress Cache

PHP Composer Psalm Security Scan PHP 8.1 Compliant Script

Oopress PHP PSR-16 cache drivers. Comes with the basic PSR compliant OOP approach possibility, but can also be used functionaly, from caching "high order functions" to be explained below. For now, it comes with drivers to manage file cache, a MySQL custom table cache adjusted for Wordpress, a Memcached and a Redis drivers. The classes can be used separatedly in any implementation, but also inside two high order functions: and .

OOPress

Agnostic caching drivers

Except for WPDB-based MySQL cache driver, all drivers in this package can also be used outside of Wordpress context. As PSR compliant drivers, they can be in any PHP script - similarly, the high order functions that you find in this package can also have other PSR-16 compliant cache objects injected. Using each driver is simple, although some of them have particular parameters. Here's an example for Redis:

For the MySQL cache, the class will assume you are in a Wordpress context, so WP's class wpdb is to be used by the driver. Like this:

Function

This function is designed to cache the results of specific WordPress queries. It takes a cache interface, an expiration time, and a query type as input. It returns a closure that, when called with query arguments, will:

Key Points:

Example

Function

This function is a more generic caching mechanism that can be used to cache the results of any callable function or method. It takes a cache interface and an expiration time as input. It returns a closure that, when called with a callable and its arguments, will:

Key Points:

Example

Use Cases:

By using these functions, you can significantly improve the performance of your WordPress applications.

JS like syntax:

A JS like syntax can also be used with PHP closures, so the next arguments can be passed directly to the Closure, like this.


All versions of caching with dependencies

PHP Build Version
Package Version
Requires psr/simple-cache Version ^3.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 oopress/caching contains the following files

Loading the files please wait ....