FUSE includes a mechanism for the daemon to instruct the kernel to cache file attributes, inode values, or both. Currently fuse(4) ignores the cached inodes. We should make use of them, to improve the performance of VOP_LOOKUP operations on fuse filesystems.
Some of this was implemented in r344183 and r344184, but shortcomings remain; tracked in:
1. Real timeout support: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235773
2. Using valid cached values: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235775
You're right; I made a mistake in my test function when I wrote this bug. Caching inode entries already works. The only broken part is expiring old cache entires, and you already have a bug open for that.