Adjusted pyimagecache to take a bind object instead of a session object.