Тёмный

Massive Python Speed-Up: Caching Across Sessions 

NeuralNine
Подписаться 367 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@goodlack9093
@goodlack9093 3 месяца назад
This is actually very useful, thank you!
@DJPapzin
@DJPapzin 8 месяцев назад
🎯 Key Takeaways for quick navigation: 00:00 🚀 *Introduction to caching in Python* - Caching involves storing function call results to save time in subsequent calls. - By default, Python has the `@lru_cache` decorator, which is limited to a single session. 01:00 🔄 *Using the built-in lru_cache decorator* - `@lru_cache` helps speed up function calls by storing results. - The cache is session-specific and doesn't persist across sessions. 03:00 📦 *Creating a custom exportable cache decorator* - Developing a custom decorator called `exportable_cache` to enable cache export/import. - The decorator uses a dictionary to store cached results. - It serializes the cache to a file for persistent use across sessions. 08:56 💾 *Exporting the cache to a file* - Demonstrates how to export the cache to a pickle file. - This allows reusing the cache in future sessions, improving efficiency for computationally intensive functions. Made with HARPA AI
@cowgummy92
@cowgummy92 8 месяцев назад
nice thanks. I've been doing it "manually" when needed by exporting/importing to a json file when needed
@omegasigma4500
@omegasigma4500 8 месяцев назад
Wouldn't this be easier with redis?
@tips1483
@tips1483 8 месяцев назад
Haven't tested it, and am currently exhausted, however with the way you're caching the data couldn't you have issues with mutables getting passed in but having a different value between calls?
@opaldps
@opaldps 8 месяцев назад
Very cool
@hsabatino
@hsabatino 8 месяцев назад
Can I use this in a Django app?
@andreiarseni362
@andreiarseni362 8 месяцев назад
First
Далее
Garbage Collection in Python: Speed Up Your Code
16:41
Пришёл к другу на ночёвку 😂
01:00
ГИГАЧАД МЭЙКЕР В PLANTS VS ZOMBIES 2!
00:49
Вопрос Ребром - Булкин
59:32
Просмотров 493 тыс.
Transfer Complex Python Objects via Sockets
13:36
Просмотров 9 тыс.
PLEASE Use These 5 Python Decorators
20:12
Просмотров 111 тыс.
Compiled Python is FAST
12:57
Просмотров 109 тыс.
Modern Python logging
21:32
Просмотров 183 тыс.
Debugging 101: Replace print() with icecream ic()
12:36
Speed Up your Python Apps with Caching
43:17
Просмотров 2,1 тыс.
Synchronizing Multiple Processes in Python
9:31
Просмотров 10 тыс.
Пришёл к другу на ночёвку 😂
01:00