fix: domain test in value
value cache done using shared pointers