Changed query to get queue info.
adds cache option; fixes tests; updates documentation