Download the PHP package dwnload/wp-rest-api-object-cache without Composer

On this page you can find all versions of the php package dwnload/wp-rest-api-object-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 wp-rest-api-object-cache

WordPress REST API Object Cache

[PHP from Packagist]() Latest Stable Version Total Downloads License Build Status

Enable object caching for WordPress' REST API. Aids in increased response times of your applications endpoints.

Package Installation (via Composer)

To install this package, edit your composer.json file:

Now run:

$ composer install dwnload/wp-rest-api-object-cache


Actions

Action Argument(s)
Dwnload\WpRestApi\RestApi\RestDispatch::ACTION_CACHE_SKIPPED mixed $result
WP_REST_Server $server
WP_REST_Request $request
Dwnload\WpRestApi\WpAdmin\Admin::ACTION_REQUEST_FLUSH_CACHE string $message
string $type
WP_User $user

How to use actions

Filters

Filter Argument(s)
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_CACHE_HEADERS array $headers
string $request_uri
WP_REST_Server $server
WP_REST_Request $request
WP_REST_Response $response (rest_pre_dispatch only)
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_CACHE_SKIP boolean $skip ( default: WP_DEBUG )
string $request_uri
WP_REST_Server $server
WP_REST_Request $request
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_API_KEY string $request_uri
WP_REST_Server $server
WP_REST_Request $request
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_API_GROUP string $cache_group
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_CACHE_EXPIRE int $expires
Dwnload\WpRestApi\WpAdmin\Admin::FILTER_CACHE_UPDATE_OPTIONS array $options
Dwnload\WpRestApi\WpAdmin\Admin::FILTER_CACHE_OPTIONS array $options
Dwnload\WpRestApi\WpAdmin\Admin::FILTER_SHOW_ADMIN boolean $show
Dwnload\WpRestApi\WpAdmin\Admin::FILTER_SHOW_ADMIN_MENU boolean $show
Dwnload\WpRestApi\WpAdmin\Admin::FILTER_SHOW_ADMIN_BAR_MENU boolean $show
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_ALLOWED_CACHE_STATUS array $status HTTP Header statuses (defaults to array( 200 )
Dwnload\WpRestApi\RestApi\RestDispatch::FILTER_CACHE_VALIDATE_AUTH boolean $authenticated
WP_REST_Request $request

How to use filters

Sending headers.

Changing the cache expire time.

Validating user auth when ?context=edit

Skipping cache

Deleting cache

Soft delete: Append RestDispatch::QUERY_CACHE_DELETE to your query param: add_query_arg( [ RestDispatch::QUERY_CACHE_DELETE, '1' ], '<url>' ).
soft delete will delete the cache after the current request completes (on WordPress shutdown).

Hard delete: Append RestDispatch::QUERY_CACHE_DELETE && RestDispatch::QUERY_CACHE_FORCE_DELETE to your query param: add_query_arg( [ RestDispatch::QUERY_CACHE_DELETE, '1', RestDispatch::QUERY_CACHE_FORCE_DELETE, '1' ], '<url>' ).
hard delete will delete the cache before the request, forcing it to repopulate.

empty ALL cache on post-save this is not ideal

You can use the WordPress filter save_post if you would like to empty ALL cache on post save.

Maybe better to use transition_post_status


All versions of wp-rest-api-object-cache with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
thefrosty/wp-utilities Version ^1.2.2
php Version >=7.0.4
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 dwnload/wp-rest-api-object-cache contains the following files

Loading the files please wait ....