Caching WFS data


I’m using OgrLayerDataSource and OgrLayer to load a WFS service (supplying an extents to the service to get the data for). I’m then using the OgrLayer.GetBuffer method to get a shapefile based on the WFS results, which I then use for applying colour ramps / viewing attribute info etc.

What I am after is a way to cache the data returned by the WFS so that I can get more data for the same layer when, say the user pans, by supplying new extents and fetching that data. I would like it to append new data to the layer or some way to add it to the existing buffer, rather than losing what is already there. Is there any way to achieve this? It looks like QGIS is doing this, but I don’t know the mechanism behind it.


Rob H