Caches the parsed version of the specified CSS snippet. We key the cache based on CSS snippets (rather than requests and responses as is done above) because a) this allows us to cache inline CSS, b) CSS is extremely expensive to parse, so we want to avoid it as much as possible, c) CSS files aren't
(final String css, final CSSStyleSheetImpl styleSheet)
| 200 | * @param styleSheet the parsed version of <code>css</code> |
| 201 | */ |
| 202 | public void cache(final String css, final CSSStyleSheetImpl styleSheet) { |
| 203 | final Entry entry = new Entry(css, null, styleSheet); |
| 204 | entries_.put(entry.key_, entry); |
| 205 | deleteOverflow(); |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * Truncates the cache to the maximal number of entries. |
no test coverage detected