Welcome Guest, Not a member yet? Register   Sign In
Cache Expiring

I am trying to cache images, with not luck. The response is only the image, and it works. But not the cache.

This is the only Controller (the response is the image itself and the .ico file):

PHP Code:
public function getImage($filename null)
        $basefolder 'test/';
        $filename $basefolder.$filename;
        $cacheOptions = [
            'max-age'  => DAY

And this is the response header:
HTTP/1.1 200 OK
Date: Mon, 25 May 2020 19:52:44 GMT
Server: Apache/2.4.38
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: max-age=86400
Pragma: no-cache
Debugbar-Time: 1590436364
Debugbar-Link: https://blog.casa.spiti/?debugbar_time=1590436364
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: image/jpeg

What means the expiring date of 1981 and how do I change it?

I also noticed, that the image is described as docuement in the Network analysis tab. How can I change that? Is it because I am using readfile? Is there a better option for that? Same for videos, btw.
It is easier to search the internet than posting a question. So, yes, I am asking because I did not find the answer anywhere else.

Messages In This Thread
Cache Expiring - by elserra - 05-25-2020, 01:08 PM

Theme © iAndrew 2016 - Forum software by © MyBB