Now uses a cache and allows a table to be passed as set
removing hard deps
bug when setting a value with a table