<br><br><div class="gmail_quote">On Tue, Aug 9, 2011 at 9:36 AM, Mark Cave-Ayland <span dir="ltr"><<a href="mailto:mark.cave-ayland@siriusit.co.uk">mark.cave-ayland@siriusit.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Not so much the caching (as the PROJ.4 API is similar in this aspect), but the ability to detect memory leaks within the caching code and a fixed API for caching in general. Then we can write a set of function callbacks to make adding caching to any other function within PostgreSQL really easy.<div>
<div></div><br></div></blockquote><div><br>The thing that gives me pause is making a generic caching facility in a language like C. Polymorphism is really hard in that environment, as indicated by the lack of generic caching libraries in C. The hard part is not necessarily just storing the pointer to an opaque type, but figuring out whether you have a cache hit or not. Sounds like a pandora's box to me.<br>
<br>What about using BerkeleyDB in a RAM only configuration as a key/value store? It's mature, stable, and multiplatform.<br><br>Bryce<br><br><br></div></div>