Download the PHP package xima/t3api-cache without Composer

On this page you can find all versions of the php package xima/t3api-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 t3api-cache

TYPO3 extension t3api_cache

This extension provides a simple cache for the API response of the TYPO3 extension t3api.

Installation

Install the extension via composer:

Usage

Breaking Change (v1.0.0): The table name is now included as a cache tag by default. This means that creating, updating, or deleting any record of the table will flush all related cache entries. If you previously relied on the behavior without table name tags (v0.x), add disableTableNameTag=true to your @ApiCache annotation to restore the old behavior.

The extension provides a new Annotation @ApiCache which can be used in your ApiResource class to active caching for the specific resource:

Configuration

There are multiple configuration options available:

parametersToIgnore

This option allows you to prevent caching of the response for specific query parameters. This can be useful if you have e.g. a search parameter which should not be cached, since it is too individual.

lifetime

The lifetime of the cache entry in seconds. Default is 86400 (1 day).

disableTableNameTag

By default, the table name is added as a cache tag to all cache entries. This means that when any record of that table is created, updated, or deleted, all cache entries for that table are flushed. If you want to disable this behavior and only flush cache entries for the specific record that was changed, set disableTableNameTag=true.

@ApiCacheRoundDatetime

When using datetime filters, clients often request the API with the current timestamp. Since the timestamp is always different, no cache hits occur. The @ApiCacheRoundDatetime annotation can be placed on the class to round the corresponding datetime filter parameter value to a configurable precision before the cache key is generated. This ensures that requests within the same time window produce the same cache key, significantly improving cache hit rates.

Multiple @ApiCacheRoundDatetime annotations can be used on the same class — one per parameter.

The parameterName specifies the base query parameter name (e.g. "date"), and it automatically applies to all filter variants of that parameter (e.g. date=123, date[lt]=..., date[gte]=...).

The annotation accepts the following options:

Example: Round a datetime filter to the nearest hour (floor)

In this example, a request with ?date=2025-03-26T09:47:12+00:00 and another with ?date=2025-03-26T09:12:45+00:00 will both be rounded to 2025-03-26T09:00:00+00:00, resulting in the same cache key.

Filter variants like ?date[gte]=2025-03-26T09:47:12+00:00 are also automatically rounded.

Example: Multiple datetime parameters with different precisions

The annotation supports Unix timestamps, ISO 8601 dates, and date-only strings (e.g. 2025-03-26). The rounded value is returned in the same format as the input.


All versions of t3api-cache with dependencies

PHP Build Version
Package Version
Requires sourcebroker/t3api Version ^4.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 xima/t3api-cache contains the following files

Loading the files please wait ...