Ticket #2432 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Image resizing cache broken in case of Tramline Image

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.5.3
Component: CPS (global) Version: TRUNK
Severity: normal Keywords: image resizing cache
Cc:

Description

Since the recent changeset 64b5e504fadb, done in the course of #2425, we have a logic where 5 is no more the total number of resized images in the cache, to account for cases where a given doc has more than 5 *original* images to begin with.

Instead the maximal number of items in the cache is set to 5 times the number of original images, but this does not take Tramline Images into account, and this leads in fine to no caching of resized versions of them and :

  Module Products.CPSCore.ProxyBase, line 985, in index_html
  Module Products.CPSCore.ProxyBase, line 1053, in getImage
  Module Products.CPSCore.ProxyBase, line 1078, in setInCache
IndexError: list index out of range

Change History

comment:1 Changed 8 years ago by gracinet

Fixed : now the counting is much more robust, and does not rely on meta_type, but uses id prefixes to recognize related images.

Actually the cache does not know about the fact that they are related : it implements a max number per prefix.

Now there's a test for the cache saturation logic, too

comment:2 Changed 8 years ago by gracinet

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.