First off, this question is not a duplicate of Function dual to std::move? or of Does the inverse of std::move exist?. I am not asking about a mechanism to
Leave perfect forwarding out of your forwarding function, and you have no_move:
template constexpr T& no_move(T&& x) {return x;}
Just be sure pretending you have an lvalue-reference instead of an rvalue reference is ok, as that circumvents the protection against binding of temporaries to non-const references and such.
Any code using this function is with near-certainty defective-by-design.
In your example use-case, the proper way would be changing the argument-type of f() to const& so no such adaptor is neccessary, and using const_cast to add to the cache of saved computations.
Be sure not to change non-mutable members on an object declared const though.