Reference the thumbnail URL in your HTML as though it exists already.

Catch the missing files when requested (either in Apache via mod_rewrite, or
Joomla's 404 handler) and redirect to your thumbnail creation handler.

This script should generate the file and write it to your thumbnail URL,
then redirect back to the assigned thumbnail URL.

Your thumbnails will be built as they are viewed, which means that unviewed
thumbnails don't place any load on the system. You can batch-build them at
offpeak hours simply by requesting them (wget -m oughta do it).

Also,

On Mon, Jan 11, 2010 at 9:37 AM, matt_thomson <[email protected]> wrote:

> 2.) Make the images on the fly, and try some kind of caching method.
> * Problem, even with some kind of caching, the gallery images are still
> going to be have to remade quite regularly (the gallery will run on
> other customers servers, so only php caching is an option).* Ideally I
> want the user to make a gallery, have the images made, then have the
> images downloaded for a month. Not have the gallery made, then have
> the images remade 5,000 times over the next month (slowing down the
> server).


... you don't say why the images will need remaking regularly? If this is
because updated images are supplied over time, then you need to purge (only)
those matches from the cache when an image is updated. They will then be
rebuilt when next viewed.
-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to