Caching of canvas or canvas data?


I've developed a GTK application under linux (debian etch) which plots my simulation data really nicely. I'm now trying to implement some caching to avoid a) loading datafiles which are 'recent' and b) replotting and redrawing data which is 'recent' (assuming this would be quicker!). I have managed the former rather easily using a fifo type structure, and the latter could be easy if I had some idea how to cache the buffer, pixels or whatever is most convenient of the canvas. For example, could I have multiple canvases, and switch which one is displayed in the gtk container? or would it be better to save the 'data' (pixels? vector graphics?) of the canvas somewhere, and copy that backwards and forwards? Any ideas?



Neil Pilgrim