What is the best way to cache a dataset? 
{'login': 'Mistobaan', 'id': 112599, 'node_id': 'MDQ6VXNlcjExMjU5OQ==', 'avatar_url': 'https://avatars.githubusercontent.com/u/112599?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/Mistobaan', 'html_url': 'https://github.com/Mistobaan', 'followers_url': 'https://api.github.com/users/Mistobaan/followers', 'following_url': 'https://api.github.com/users/Mistobaan/following{/other_user}', 'gists_url': 'https://api.github.com/users/Mistobaan/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/Mistobaan/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/Mistobaan/subscriptions', 'organizations_url': 'https://api.github.com/users/Mistobaan/orgs', 'repos_url': 'https://api.github.com/users/Mistobaan/repos', 'events_url': 'https://api.github.com/users/Mistobaan/events{/privacy}', 'received_events_url': 'https://api.github.com/users/Mistobaan/received_events', 'type': 'User', 'site_admin': False}
[]
[]
['Everything is already cached by default in 🤗nlp (in particular dataset\nloading and all the “map()” operations) so I don’t think you need to do any\nspecific caching in streamlit.\n\nTell us if you feel like it’s not the case.\n\nOn Sat, 6 Jun 2020 at 13:02, Fabrizio Milo <notifications@github.com> wrote:\n\n> For example if I want to use streamlit with a nlp dataset:\n>\n> @st.cache\n> def load_data():\n>     return nlp.load_dataset(\'squad\')\n>\n> This code raises the error "uncachable object"\n>\n> Right now I just fixed with a constant for my specific case:\n>\n>     @st.cache(hash_funcs={pyarrow.lib.Buffer: lambda b: 0})\n>\n> But I was curious to know what is the best way in general\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/huggingface/nlp/issues/246>, or unsubscribe\n> <https://github.com/notifications/unsubscribe-auth/ABYDIHKAKO7CWGX2QY55UXLRVIO3ZANCNFSM4NV333RQ>\n> .\n>\n'
 'Closing this one. Feel free to re-open if you have other questions !']
For example if I want to use streamlit with a nlp dataset:

```
@st.cache
def load_data():
    return nlp.load_dataset('squad')
```
This code raises the error "uncachable object"

Right now I just fixed with a constant for my specific case:
```
    @st.cache(hash_funcs={pyarrow.lib.Buffer: lambda b: 0})
```
But I was curious to know what is the best way in general


{'url': 'https://api.github.com/repos/huggingface/datasets/issues/246/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}