Reworked TIRShareMem caching