A Slim application provides built-in support for HTTP caching with its
helper methods. It is best to use one of
lastModified() - in conjunction with
expires() - per route;
never use both
lastModified() together in the same route callback.
lastModified() methods should be invoked in a route callback before other code; this allows Slim
to check conditional GET requests before processing the route callback’s remaining code.
lastModified() instruct the HTTP client to store the resource response in a client-side cache.
expires() method indicates to the HTTP client when the client-side cache should be considered stale.