[Typo3-dev] caching, CLI, and IMG_RESOURCE
Kasper Skårhøj
kasper2005 at typo3.com
Wed Apr 27 12:12:47 CEST 2005
Hi Zach,
Stumbled over this old mail...
I'm working on a yet-not-released extensions "crawler" which can be used
for your purpose. Basically you can configure the crawler to generate
URLs from some configuration. Such a configureation could be to say
"visit
http://myserver.tld/index.php?id=somewhere_with_my_images&image_uid=[here goes the UID]" for each UID of a certain table. the generated URLs (thousands if you like) is queue up in the database and will be requested over time by a cron-job.
Just FYI
- kasper
On Fri, 2005-01-07 at 04:58, Zach Davis wrote:
> I'm a bit stumped with a typo3 problem; maybe somebody here can help.
>
> So, I wrote an extension for a client -- basically it's an image gallery
> with 1000+ image records. Each image file is displayed as an IMAGE
> cObject, which means that the first time an image is displayed it's
> resized and cached (a version of the file is created in typo3temp and 2
> corresponding records are recorded in cach_imagesizes).
>
> Here's the problem: every now and then the client needs to crawl the
> gallery and cache every image. It's very time consuming and CPU
> intensive, so my preference is to make it something that can be run via
> cron or, even better, from the command line. It's easy to write a view
> for the extension that goes through the table and calls cObj->image on
> each record to generate the cached file, but it takes too long and it
> times out.
>
> So, I used the CLI API (Rainer's approach of using $_SERVER['argv'][0]
> for the PATH_thisScript value, incidentally, works fine in redhat linux)
> to set up a script that can be called from the command line -- so far so
> good. Ideally, I'd like the script to be able to go through the database
> and call the same cObj->IMAGE method that's called in the frontend when
> the records are displayed. This is where I'm stuck -- seems to me that
> this cObject method is only available in the frontend.
>
> My question, I guess, is this: Is it possible to call
> cObj->IMAGE_RESOURCE from a backend CLI script so that all my images can
> get cached?
>
> Your help is, as always, much appreciated.
>
> best wishes,
> Zach
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
--
- kasper
*******************
Happy new year! - My email address is now:
kasper2005 at typo3.com
More information about the TYPO3-dev
mailing list