read and write non-picke formats for cache-queries