Adding cache feature to the truncatable library.