Learning Switch Cache
Missing some safety details but working with cache.