Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавил кэширование #320

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

koshakkkq
Copy link
Collaborator

Краткое название

Добавил кэш на query юзеров на весь проект, и кэш на вьюшку projects

Описание изменений

Опишите изменения, которые вы внесли в код. Не забывайте указывать номер задачи или ссылку на тикет.

Тестирование

Опишите, как тестировали свои изменения. Например, какие тесты проходят, а какие нет.

Проверка кода

Опишите, как проверить ваш код.

Дополнительная информация

Здесь вы можете добавить какую-либо дополнительную информацию о своих изменениях.

@koshakkkq koshakkkq changed the title done Добавил кэширование Mar 9, 2024
Comment on lines +194 to 199
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": REDIS_CONN_URL,
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
},
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если использовать FileBasedCache нельзя тянуть все ключи содержащие project_list, инвалидация становится невозможной.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

очень не хочется на локалке каждый раз поднимать редис чтобы кеш работал, с этим разве нельзя сделать ничего?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно накостылить свой client_class для FileBasedCache, который будет искать по совпадениям в ключах, но не вижу проблем запускать редис в локале, wsl позволяет это одной строчкой сделать

@Yakser Yakser changed the base branch from master to dev March 10, 2024 13:13
@sh1nkey sh1nkey force-pushed the features/cache_projects_and_users branch from d81921b to 45271b6 Compare March 14, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants