PHPackages                             knplabs/php-valid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. knplabs/php-valid

AbandonedArchivedLibrary[Caching](/categories/caching)

knplabs/php-valid
=================

A HTTP cache validation toolkit

33[5 issues](https://github.com/KnpLabs/valid-http-cache/issues)PHP

Since Oct 15Pushed 8y ago31 watchersCompare

[ Source](https://github.com/KnpLabs/valid-http-cache)[ Packagist](https://packagist.org/packages/knplabs/php-valid)[ RSS](/packages/knplabs-php-valid/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

php-valid
=========

[](#php-valid)

What
----

[](#what)

A php 5.3+ library to help manage HTTP/1.1 cache validation headers, using the symfony/HttpFoundation layer.

Why
---

[](#why)

Because there is no known library that provides a clean, decoupled way to manage them. The actual [docs](http://symfony.com/doc/current/book/http_cache.html#optimizing-your-code-with-validation) just shows dirty controller examples.

How
---

[](#how)

By observing requests and asking `Rule` instances if response has changed since last time client asked, either using If-Modified-Since or ETag headers.

Install
-------

[](#install)

```
composer require "knplabs/valid=~0.1@dev"
```

Use
---

[](#use)

```
