added simple cache for bdds