Branch: Tag:

2009-12-01

2009-12-01 18:06:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

The metadata handling now also knows about timeouts.

Rev: server/modules/graphics/business.pike:1.157
Rev: server/modules/graphics/cimg.pike:1.86
Rev: server/modules/graphics/gbutton.pike:1.123
Rev: server/modules/graphics/graphic_text.pike:1.312
Rev: server/modules/graphics/gxml.pike:1.50

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.85 2009/11/30 15:01:58 grubba Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.86 2009/12/01 18:06:38 grubba Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "
492:    res["file-size-kb"] = strlen(data)/1024;    if (lower_case(args->nodata || "no") == "no")    res["data"] = data; -  res |= the_cache->metadata( a, id, 0 ); // enforce generation +  res |= the_cache->metadata( a, id, 0, timeout ); // enforce generation   #ifdef DEBUG_CACHEABLE    report_debug("%s:%d restored cacheable flags\n", __FILE__, __LINE__);   #endif
535:    int no_draw = !id->misc->generate_images;    mapping size;    if( !args->width && !args->height -  && (size = the_cache->metadata( a, id, no_draw )) ) +  && (size = the_cache->metadata( a, id, no_draw, timeout )) )    {    // image in cache (no_draw above prevents generation on-the-fly)    args->width = size->xsize;