lru generic version, with decorator