<p>This is mostly geared toward desktop application developers.  <br />How do I design a caching block which plays nicely with the GC?  <br />How do I tell the GC that I have just done a cache sweep and it is time to do a GC?  <br />How do I get an accurate measure of when it is time to do a cache sweep?</p>

<p>Are there any prebuilt caching schemes which I could borrow some ideas from?</p>

[{'answer_id': 23734, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>Include a method:</p>\n\n<pre><code>void text(n){\n    builder.yield n\n}\n</code></pre>\n\n<p>Most likely you (I) copied this code from somewhere that had a text method, but you didn't also copy the text method.  Since MarkupBuilder accepts any name for the name of a tag and browsers ignore unknown markup, it just happened to work.</p>\n"}, {'answer_id': 81815, 'author': 'Hank Gay', 'author_id': 4203, 'author_profile': 'https://Stackoverflow.com/users/4203', 'pm_score': 3, 'selected': False, 'text': "<p>Actually, the recommended way now is to use <code>mkp.yield</code>, e.g.,</p>\n\n<pre><code>src.p {\n    mkp.yield 'Some element that has a '\n    strong 'child element'\n    mkp.yield ' which seems pretty basic.'\n}\n</code></pre>\n\n<p>to produce</p>\n\n<pre><code>&lt;p&gt;Some element that has a &lt;strong&gt;child element&lt;/strong&gt; which seems pretty basic.&lt;/p&gt;\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/23175', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1490/']