lonnieezell / monarch

A back-to-basics framework for the modern web.
MIT License
16 stars 0 forks source link

Cache Engine #1

Open lonnieezell opened 4 months ago

lonnieezell commented 4 months ago

Use Nette's Caching layer as the core and put our own touch on top of it.

#[Cacheable]
public function get() 
{
    //
}

This instructs the system to cache the output of the function. You can define the key and the TTL also:

#[Cacheable(key: 'some-key', ttl: 3600)]