Re-implmented character caching