added $tos.getResource()
added cache at $tos.getResource()