1
In the Inphinit Framework it is possible to cache HTTP responses, see an example:
Route::set('GET', '/hello', function () {
$cache = new Cache;
if ($cache->cached()) {
return;
}
return str_repeat('Hello, world! ', 1000);
});
Note that I only need one class object Cache
then just call the method cached()
to work.
However, the very resource of cache already leaves me some doubts about what it represents for my application.
Doubts
- What are caches in relation to web applications?
- What does the cache have to do with the HTTP protocol? I always have to use? It is only linked to the answers?
Related: What makes cache invalidation a difficult solution?
– Woss