Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #4369 (closed)

Opened 13 years ago

Closed 13 years ago

Caching of planes not working?

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-Beta4.3
Component: Web Version: n.a.
Keywords: n.a. Cc: atarkowska, cneves
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-03-10 (7)

Description

While adding 'region' methods to webgateway, #4003 I also adding the region details to the rendered image caching key and noticed that the planes were not being retrieved from the cache when required.

Need to find out if this is a bug or some configuration issue etc.

Change History (16)

comment:1 Changed 13 years ago by wmoore

  • Status changed from new to accepted

comment:2 Changed 13 years ago by wmoore

dev-chat with Carlos...

there are 2 keys the cache will read from settings to operate:
CACHE=getattr(settings, 'WEBGATEWAY_CACHE', None)
TMPROOT=getattr(settings, 'WEBGATEWAY_TMPROOT', None)
so WEBGATEWAY_CACHE should point to a directory where the image and thumb cache will be stored
and WEBGATEWAY_TMPROOT will be the place where movies and exports are stored for a small time
TMPROOT needs more explanation, and some other configurations, I'll walk you through it soon
and _CACHE needs to be set in the default deployment

I use dist/var/weblitz_cache on my deployments
maybe add that to the instructions wiki page?
give it a test, check that it is working, will you?

TMPROOT is different because it is used as common space for both django to export and nginx (in my case) to feed to browser
it's really important when you have huge zip files being transfered

but that means both configuring webgateway_cache to put things on this dir and the web server to pick up that location
settings: WEBGATEWAY_TMPROOT = 'whatever'
but there's an extra step for the web server
let me check that
ok, after setting TMPROOT to some dir, webgateway/views:render_ome_tiff will send an http redirect to /appmedia/tfiles when the file exists in the filesystem
that means that inside the directory pointed by appmedia there needs to be a tfiles
I use a symlink to the TMPROOT, but it can be the actual TMPROOT too

comment:3 Changed 13 years ago by wmoore

With the webgateway_cache set

omero.web.webgateway_cache=dist/var/weblitz_cache

The cache folder gets created at

dist/lib/python/omeroweb/dist/var/weblitz_cache

comment:4 Changed 13 years ago by wmoore

  • Owner wmoore deleted
  • Status changed from accepted to new

comment:5 Changed 13 years ago by wmoore

  • Owner set to wmoore

comment:6 Changed 13 years ago by wmoore

  • Remaining Time set to 0.5

comment:7 Changed 13 years ago by wmoore

  • Remaining Time changed from 0.5 to 1

comment:8 Changed 13 years ago by Will Moore <will@…>

(In [5400ddc48b198ccaf6f1a8fefea57eee6c14b054/ome.git] on branch develop) Added webgateway_cache to settings, although setting omero.web.webgateway_cache=dist/var/weblitz_cache
creates cache in wrong place, but cache working OK. See #4369

comment:9 Changed 13 years ago by Will Moore <will@…>

(In [8b7e04f12d40835428e170e741ba325a1130fa72/ome.git] on branch develop) Fixed bug in default webgateway cache location. See #4369

comment:10 Changed 13 years ago by jburel

  • Sprint changed from 2011-02-24 (6) to 2011-03-10 (7)

Moved from sprint 2011-02-24 (6)

comment:11 follow-up: Changed 13 years ago by wmoore

  • Owner changed from wmoore to cneves-x

Carlos - can you let me know if I am doing something wrong here?
Should I be specifying an absolute path to cache location or should the webgateway cache be attempting to use the 'dist' folder as the root for caching?

Currently, with the webgateway_cache set to

dist/var/weblitz_cache

The cache folder gets created at

dist/lib/python/omeroweb/dist/var/weblitz_cache

comment:12 in reply to: ↑ 11 Changed 13 years ago by cneves

Replying to wmoore:

Should I be specifying an absolute path to cache location or should the webgateway cache be attempting to use the 'dist' folder as the root for caching?

As with every other single path set in settings.py, it gets expanded from os.getcwd() (which is dist/lib/python/omeroweb for us). So you have 3 choices;

  • change the current directory omeroweb runs from (dangerous, who knows what this might break)
  • use a relative path based on dist/lib/python/omeroweb (../../../var/weblitz_cache)
  • just use an absolute path.

comment:13 Changed 13 years ago by cneves

  • Owner changed from cneves-x to wmoore

comment:14 Changed 13 years ago by wmoore

  • Status changed from new to accepted

comment:15 Changed 13 years ago by wmoore

Using relative paths:

omero config set omero.web.webgateway_cache "../../../var/weblitz_cache"

creates cache in

dist/var/weblitz_cache

Using absolute paths:

omero config set omero.web.webgateway_cache "/OMERO/weblitz_cache"

also works!

comment:16 Changed 13 years ago by wmoore

  • Remaining Time changed from 1 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.72798 sec.)

We're Hiring!