A simplified way to write to cache in Android.