Update cache.py
Update cache.py

johnny.cache.get_tables_for_query_pre_16: use a set as the base tables collection before entering recursion, thus avoiding a MemoryError should the WHERE descendant list go too deep.
jmoiron/johnny-cache