Skip to content

marko-php/marko-page-cache-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marko/page-cache-file

File-based full-page cache driver --- stores cached HTTP responses on disk with tag-based invalidation and atomic writes.

Installation

composer require marko/page-cache marko/page-cache-file

Quick Example

use Marko\PageCache\Attributes\Cacheable;
use Marko\Routing\Attributes\Get;
use Marko\Routing\Http\Response;

class ProductController
{
    #[Get('/products/{id}')]
    #[Cacheable(ttl: 3600, tags: ['products', 'product-{id}'])]
    public function show(int $id): Response
    {
        return Response::ok($this->productRepository->find($id));
    }
}

Documentation

Full usage, API reference, and examples: marko/page-cache-file

About

[READ-ONLY] File-based page cache driver for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages