• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

QUESTION How can I cache a specific PHP file? (external image proxy)

Luu

Member
Messages
9
Likes
0
Points
1
#1
I have a PHP file that contains a specific URL of an image with a GET parameter.
This is loaded via my server (due to privacy).
How can I have the PHP file cached with a specific parameter so that the image does not always have to be loaded?

Example:
mywebsite.com/imageproxy.php?url=https://someimage.com/cat.jpg

Current away:
the webserver (my site) gets the image (cat.jpg) from the external webserver on every request and displays it.

Desired way:
The first time the image is retrieved. After that the cached image is output directly instead of retrieving it again.
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#2
Hello.

There is no such possibility in the plugin. You need to implement this mechanism yourself in your PHP file.