Lack of interest Caching external images

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

cedivad

Active member
Every external image (from signature pic to post images from imageshack.us) is cached. Every url is replaced. Example:

Not cached:
http://somesite.com/pic.jpg

xF detects it's an image (it's supposed to be if it's inside the [ img ] tag) and replace the url above to:
http://mysite.com/cache.php?url=http://somesite.com/pic.jpg

This have multiple functions:
1) load the image faster
2) if the image gets deleted you have a local copy of it
3) page than load faster

Google for example, does it.

I know i will not see it here soon, but maybe you can put it in your TODO list.
 
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
How and when would the cache be updated?

It would have to be done periodically due to images on the remote servers changing.
 
Than using a database you can have it recached every 24hours...
I think i will have to code it myself.

Which is fine, but it adds a lot to the database over a short period of time and from a practicality stand point just isn't worth it. I don't think this would ever be a default option.
 
Indeed.

Recaching the entire contents of a locally stored image folder on a large forum could take some time, not to mention the amount of storage needed.
 
SELECT(*) queries are really really fast... usually. Even if you have a 100M records database.
Let's say that the most useful point is that you will be able to keep topic images even after they are deleted on the server they comes from, that would be really usefull over a decade.
 
SELECT(*) queries are really really fast... usually. Even if you have a 100M records database.
Let's say that the most useful point is that you will be able to keep topic images even after they are deleted on the server they comes from, that would be really usefull over a decade.

A single query may be fast, but they add up when you combine them with others. Depending on how active your board is and the type of discussion, that is a lot of updating, deleting, and writing going on at once just to save external images, never mind trying to update user information, Alerts, email subscriptions, etc.

If you want to save images on your database, encourage people to use the attachement system.
 
However by thinking about it it can be done by using the timestamp of the last edit of the files on the local filesystem, no db required at all.
 
However by thinking about it it can be done by using the timestamp of the last edit of the files on the local filesystem, no db required at all.

In order to check timestamps, you still need to communicate with the database and do a comparison.
 
No. You get the last edit time from the fileinfo of the file on the local filesystem. If the difference from time() is greater than x seconds you have to update it.
 
SELECT * isnt fast. The contrary is true. The less columns you fetch the less network traffic or memory is used. Why fetch unnecessary columns?

And your caching idea is nice but it will only work ony small forums. Imagine a forum with 100,000 or millions of posts and how big the cache will grow...
 
SELECT * isnt fast. The contrary is true. The less columns you fetch the less network traffic or memory is used. Why fetch unnecessary columns?
Sorry, didn't get that first. Simply because you have 2 or 3 columns, so it's faster to write * rather than the field ids.
However you can select only one field, no problems at all =)
 
I don't think it's for the site to cache them, but I like he idea. I just don't want to host other people their images, even in a cache, really. I will have a more indepth thinking about this. Interesting suggestion.
 
Top Bottom