more flexible cached_accessor decorator