What you describe is the default behavior of a CacheLoader. Just configure a cache loader and don't set the "passivation" flag to true, and all writes to the cache will be written to the persistent store. Eviction will then free memory, but will not affect the persistent data.
This is called using a cache loader. :-) It's all in the docs.