Well, here -- http://www.rubycentral.com/ref/ref_c_string.html -- is
the reference for the Ruby String class.

The first thing that comes to mind is going through the list, finding
destructive methods, and overriding them in your subclass with a call
to some update function, like so:

class String
    def chop!
       super

       update
    end

    # ...

    def update
       # invalidate the cache somehow
    end
   
    # ...
end

- Dan