On 10/24/06, Yuval Kogman <[EMAIL PROTECTED]> wrote:
Ouch, what an insane client...

I hope you're charging them $$$ ;-)

Not really. But they gave me the opportunity to use whatever I wanted so it was perfect for my first Catalyst project. You now must think that it is I who is insane!
 

Use ImageMagic/Imager/GD or whatever to dump out a scalar, and then
put that in $c->response->body, and set the content type
appropriately, in something like

Yes, I was thinking along these lines. I had done something similar with MapServer several years ago, but used random number image files.
 
        sub images : Local {
                my ( $self, $c, $image ) = @_;

[...]

                # make sure to set the caching control headers, like
                # expires, cache-control, last-modified, etc
        }

Thanks for the example!


and make sure that $scaled can behave nicely with Storable.

 Ok.

The reason I suggest doing this and not adjacent files is that the
key space cardinality ( image * width * height ) is very big. If you
only need width that's better, i guess, but there's still a
potential to easily have several hundred versions of a single image.

Yeah well. In either case I have to generate the image, so unless, the images are re-used
 it makes no sense to store them on disk. If the image name had the dimentions I could check if that particular image was already generated, but it looks like too much trouble.

I think I will use AJAX to request the generation of the image. Besides, all this trouble is _only_ for the main page news image and a few other places. The site itself is actually quite simple.

When I finish this site I will make the code available so you can shoot at it :-D

Using one of the Cache modules on the CPAN you can constrain the
cache to say 200MB and still get decent performance.

I hope this helps


There are two more categories of plugins - ones that act on the web
specific data structures (e.g. C::P::Browser, C::P::Session), and

[...]

controller just using caching services, and the configuration
providing all the know-how for choosing the right cache, etc.

It doesn't sound like any of these scenarios coincide with yours.

Thanks!

 

--
  Yuval Kogman <[EMAIL PROTECTED] >
http://nothingmuch.woobling.org  0xEBD27418



_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/




_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to