Download the PHP package vatvit/freshen-symfony without Composer

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

⚠️ Read-only mirror. This repository is the Packagist publish mirror of packages/symfony in the Freshen monorepo. Source, issues, and pull requests live there — please don't open them here. Install with composer require vatvit/freshen-symfony.


Freshen — Symfony bundle

Drop-in stale-while-revalidate caching for Symfony. composer require + a little YAML gives you autowired, per-dataset caches with cache-stampede prevention and async invalidation — no boilerplate.

Packagist Version PHP Version License

The Symfony bundle for Freshen brings the caching pieces you normally wire up by hand into declarative config: single-flight recompute so exactly one worker rebuilds a hot key while everyone else is served the last good value (no cache-stampede); preemptive refresh that recomputes an entry before it goes stale, on TTLs and jitter you control; structured keys and effective delete — genuinely evict one exact key or a whole prefix, atomically and in one round-trip; and built-in metrics on every hit, miss, and rebuild. Declare a cache per dataset in YAML, inject it by name, and every cache-related decision is explicit and yours — no container plumbing.

Features

Symfony integration

Powered by Freshen core

Full detail in the core README.

At a glance

composer require, declare a cache in one YAML block, then inject it by name — reading is two lines, and you never touch the store, a stampede, or serialisation:

On a miss the cache calls your loader, stores the result, and returns it; later reads are served stale-while-revalidate with stampede protection — all automatic.

Install

Register the bundle (Symfony Flex does this automatically):

Configure

Freshen\Cache is per-dataset — each cache binds one loader + TTL — so you declare named caches. Each references a loader service (yours, implementing Freshen\Interface\LoaderInterface) and a \Redis client service.

A Freshen cache is one dataset, so you define one entry per data structure (top sellers, prices, …) — a real app has several:

The connection value is a service id for a connected \Redis client. Bring your own, e.g.:

Use

Inject each cache by name with named-argument autowiring — the argument name is the camel-cased cache name plus Cache. This is how you reference a dataset whether you have one cache or many (there is no bare Freshen\Cache "default" — with several datasets it would be ambiguous, and it would silently break the day you add the second one):

Async invalidation

The bundle registers each cache's Freshen\AsyncHandler on Symfony's PSR-14 event_dispatcher, so invalidate() / invalidateExact() / refresh() (async by default) dispatch Freshen\{Invalidate,InvalidateExact,Refresh}Event and are handled without you wiring listeners.

Call it wherever your data changes — e.g. an application service — and the bundle's registered handler does the rest:

Symfony's event_dispatcher is synchronous, so the handler runs within the same request: the async default decouples invalidation from the call site, it does not by itself move the work off-process (unlike the Laravel bridge's queue). To skip the event and invalidate inline, pass SyncMode::SYNC:

Caveat — shared dispatcher fan-out. These events carry a key only, not a cache id, so an async invalidate($key) is delivered to every configured cache's handler. Where a cache doesn't hold that key it's a harmless no-op, but caches that use colliding key namespaces would cross-invalidate. Give each cache a distinct Key domain/facet (they naturally differ per dataset) and this is a non-issue.

Security

Tracked by the Packagist security advisory database — run composer audit to check your install. Report vulnerabilities privately via GitHub Security Advisories; the full policy is in SECURITY.md.

Versioning

Independent SemVer, released as symfony-vX.Y.Z. Depends on vatvit/freshen-php via ^1.0. A core patch/minor needs no bridge release; a core major does. See the monorepo RELEASING.md.

Links


All versions of freshen-symfony with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
vatvit/freshen-php Version ^1.0
psr/event-dispatcher Version ^1.0
symfony/config Version ^6.4 || ^7.0
symfony/dependency-injection Version ^6.4 || ^7.0
symfony/http-kernel Version ^6.4 || ^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 vatvit/freshen-symfony contains the following files

Loading the files please wait ...