thumbalizr Supportforum

thumbalizr Supportforum » PHP local cache

how to handle duration time / queue with API

(3 posts)

  1. quibuz
    Member

    Hello,

    i've got a question about the API.
    i want my webapplication to request an image while using the API.
    The requested image should then be saved in a folder on the server.

    While using the your index-code (status = OK || status = LOCAL) this is no problem.
    The problem is that often, generating an image takes some time and therefore status = QUEUE.
    Array ( [URL] => http://www.etcetcetc.com [Generated] => Thu, 11 Dec 2008 21:58:51 GMT [Status] => QUEUED )
    At this point, the image isn't created in the cache dir and therefor can't be saved.

    Can you give me some advice how to handle the QUEUE and save the image some time later?

    Posted 1 year ago #
  2. Well, why don't you just keep asking for a new image until the status changes to OK?

    But I have another related problem. don't really care if the thumbnail is current, or at least I don't want the default image to show if there is a cached version available on my server already. I would rather have an old screenshot than the defalt image. Does anyone have code to do this in the cache file.

    Ps: I'm using a branched version of the caching script

    Posted 4 months ago #
  3. Ooops, posted to soon, this is the caching script I use : http://www.i-ssential.de/thumbalizr-forum/topic.php?id=27&page&replies=2#post-112

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.