There is no textfield in the config settings to specify imageinfo_cache_url_key, although that variable is used and checked in a few places. It would be nice to have an addition to the admin page to allow that to be entered.

CommentFileSizeAuthor
#4 imageinfo_cache-1160936-4.patch1.69 KBmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjbrown99’s picture

Actually this seems to work differently than I would expect. I would think you set a shared key on the server and client, and perform an access check on that key on the async worker before proceeding. It doesn't seem like that is the case? Or is the current assumption that you are passing async between systems that have the same backend DB? I would want to spin up cache-only servers with their own DB to minimize the Drupal memory load on the worker machines.

rjbrown99’s picture

UI was easy enough... dropped this in to imageinfo_cache.admin.inc. Now I can set keys to match on servers with different backends.

  $form['imageinfo_cache_url_key'] = array(
    '#type'           => 'textfield',
    '#title'          => t('Shared authentication key'),
    '#default_value'  => variable_get('imageinfo_cache_url_key', FALSE),
    '#description'    => t('Use at least a 9 digit key. This must match on all async servers.'),
  );
rjbrown99’s picture

Hmm... one of the other assumptions seems to be that you have a shared underlying filesystem between the primary server and async workers. It runs imagecache_generate_image($preset, $file->filepath); I would have thought it would return that to the caller but it writes it out. So I guess I need to mount the files dir between the two hosts.

mikeytown2’s picture

Status: Active » Fixed
FileSize
1.69 KB

This is the patch that was committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.