Thanks. Yes, I was going to ask if the clear should really even be needed. I could see maybe wanting to do it if either:
• There is a possibility of re-using the same symlink target later, with different contents (though a well-engineered solution shouldn't do that, I think).
• Puppetserver's cache grows un-bounded, rather than having a fixed size and evicting least-used keys (I don't know at all if this is the case or not).