Download the PHP package aerni/dynamic-cache without Composer

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


This addon has been archived in favor of the long-awaited nocache tag, which was introduced in Statamic v3.3.20.


Statamic Packagist version Packagist Total Downloads License

Dynamic Cache

If you ever used Statamic's static caching with the full strategy, you know that it doesn't play well with forms and dynamic listings like sort="random". This is where Dynamic Cache steps in. It dynamically updates the exclude and invalidation rules array in your static_caching.php config based on a boolean in your entries' content.

Dynamic Cache is a lifesaver for sites with complex page builders based on Replicator and Bard. Your page builder might have dozens of components and only one requiring dynamic functionality. Without this addon, you'd have to do without full static caching because you'd never know which page actually included that one component that doesn't work when cached statically.

Features

Note: This addon currently only works with collection entries.

Installation

Install the addon using Composer:

Publish the config of the package:

The following config will be published to config/dynamic-cache.php.

Configuration

You may change the field's handle that is used to check if an entry should be excluded from the static cache. The handle defaults to exclude_from_static_cache.

Basic Usage

Dynamic Cache will look for exclude_from_static_cache: true in your entries. The best way to add this value to your content is by creating a Fieldset with a Hidden Fieldtype and adding it to your Blueprints where necessary.

If you use a page builder, I suggest adding the Fieldset to every Replicator or Bard set that requires dynamic functionality. This way, the entry will only be excluded from the static cache if the component in question is present. If it is not, the entry will be cached statically.

Fieldset with Hidden Fieldtype:

Alternatively, you can also use a Toggle Fieldtype to manually turn the static cache on and off. Just note that this kind of defeats the dynamic problem this addon is trying to solve …

Fieldset with Toggle Fieldtype:

Manual Config Changes

You are free to manually change the exclude and rules array in the static_caching.php config. Dynamic Cache is smart enough to merge your manual changes.

Invalidation Rules

This addon will not generate any invalidation rules if the config is set to rules => 'all'.

Commands

You may update the config with the following command:

This is useful if you change your entries in your code editor rather than in the Control Panel.

Git Automation

This addon supports Statamic's Git integration. Simply add the following paths to the paths array in your git.php config. Also, make sure that the addon's storage path is tracked by git.


All versions of dynamic-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
statamic/cms Version ^3.0
stillat/proteus Version ^1.0
spatie/laravel-ray Version ^1.29
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 aerni/dynamic-cache contains the following files

Loading the files please wait ....