issue #777, make photo cache time configurable, read the comments.