One more thing. I need to point out that this actually creates a potential memory leak.
Usually, in order to purge the texture cache you would simply do so. However, if the sprite frames are cached as well, they will actually retain the texture too, so both sprite frames and texture cache must be purged.
In hindsight this may be obvious, but it also means that instead of returning frame, you should return frame.proxy unless you get it directly from the cache.
All of this indicates to me that the sprite frame cache might not be very useful to automatically use.
Also, since the only memory heavy here is actually the CCTexture, it does not make sense to cache the sprite frame.
Consequently it appears that the current version is actually correct: it first tries the cache, which also covers sprite frames from sprite sheets etc. It that fails, it creates a wrapper around a CCTexture without any need for caching, since CCTexture is cached.