<commit_before>## LRUCACHE

or maybe it should be called...

THREAD-SAFE DICTIONARY!!

orr....

WHO NEEDS MEMCACHED??

whatever you call it, this is what it is:

## Features

Lrucache is a dictionary with:

* O(1) get
* O(1) set
* O(1) delete
* safe for concurrent goroutines
* configurable maximum size
* purges least recently used element when full
* elements can report their own size (if they wanna)
* everything is cacheable (`interface{}`)
* it's a front for your persistent storage by using OnMiss hooks

I have to pee (no seriously it's making hard to concentrate but I'm sitting in
a hostel here and I don't wanna have to log out and back in again it's a lot of
work so I'm just trying to burn through this README but tbh this paragraph is
not helping) so I'll leave it here check below for more info

API on godoc: <http://go.pkgdoc.org/github.com/hraban/lrucache>

The licensing terms are described in the file LICENSE.

That O(1) thing is a lie, by the way. It's only as O(1) as Go's dictionary
implementation. Point is just that it's not worse than you'd expect, like I'd
suddenly be using a singly linked list for lookup or something. Pff haha.<commit_msg>Some improvements to Readme<commit_after>## LRUCACHE

Lrucache is a powerful key/value store for Go.

You can use it almost the same way as an in-memory dictionary (`map[string]interface{}`) but there are many important differences in implementation.

## Features

<table>

<thead>
<tr>
<th></th>
<th>
<code>
map[string]interface{}
</code>
</th>
<th>lrucache</th>
</tr>
</thead>

<tbody>

<tr>
<th>thread-safe</th>
<td>no</td>
<td>yes</td>
</tr>

<tr>
<th>maximum size</th>
<td>no</td>
<td>yes</td>
</tr>

<tr>
<th>OnMiss handler</th>
<td>no</td>
<td>yes</td>
</tr>

</tbody>
</table>

* purges least recently used element when full
* elements can report their own size
* everything is cacheable (`interface{}`)
* is a front for your persistent storage (S3, disk, ...) by using OnMiss hooks

Examples and API are on godoc:

<http://godoc.org/github.com/hraban/lrucache>

The licensing terms are described in the file LICENSE.
{'fraction_non_alphanumeric': 0.11217183770883055, 'fraction_numerical': 0.002863961813842482, 'mean_word_length': 4.24, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7161942', 'n_tokens_mistral': 712, 'n_tokens_neox': 683, 'n_words': 303}