Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 06 00:21
    Suor closed #429
  • May 05 20:13
    chepe4pi edited #429
  • May 05 19:03
    chepe4pi opened #429
  • Apr 17 07:47

    Suor on master

    Re-raise commit errors (#428) (compare)

  • Apr 17 07:47
    Suor closed #427
  • Apr 17 07:47
    Suor closed #428
  • Apr 17 07:47
    Suor commented #428
  • Apr 01 16:05
    yamnikov-oleg commented #428
  • Apr 01 08:02
    Suor commented #428
  • Mar 31 15:29
    yamnikov-oleg opened #428
  • Mar 29 08:32
    yamnikov-oleg commented #427
  • Mar 29 08:25
    Suor commented #427
  • Mar 29 08:22
    Suor commented #323
  • Mar 29 06:52
    yamnikov-oleg opened #427
  • Mar 28 13:04
    codeasashu commented #323
  • Mar 23 19:31
    abhinavsp0730 closed #426
  • Mar 23 19:31
    abhinavsp0730 commented #426
  • Mar 23 17:32
    acjh commented #426
  • Mar 23 11:51
    abhinavsp0730 opened #426
  • Mar 19 16:14
    abhinavsp0730 commented #425
Chetan Dhembre
@chetandhembre
why i havent read it before
Alexander Schepanovski
@Suor
Because it's not documented
Chetan Dhembre
@chetandhembre
ok
Chetan Dhembre
@chetandhembre
btw thanks for cacheops
Alexander Schepanovski
@Suor
you are welcome
Chetan Dhembre
@chetandhembre
it just work.. like nginx and redis respect
Alexander Schepanovski
@Suor
Thanks
Harish Sundararaj
@harishzen
Hi. I'm wondering if there is any documentation out there comparing this with johnny cache?
Alexander Schepanovski
@Suor
Johnny-cache is not supported anymore, it's working analog is django-cachalot. The main difference between cacheops and both of them is that they invalidate entire table every time any changes to it is made whereas cacheops is granular.
Chetan Dhembre
@chetandhembre
can i use cacheops without django?
as our django app using cacheops do not want to use different lib for caching
Alexander Schepanovski
@Suor
The smart part of cacheops caches django ORM querysets and other things basing on that, so I can't see how it could be used without django.
Simple and file cache might be used separately, you'll still need django as dependency and to configure them
Not sure what's the issue with the app
Chetan Dhembre
@chetandhembre
I want to use simple cache.. but at start of cacheops it expect to read config from settings file
Chetan Dhembre
@chetandhembre
got it
Chetan Dhembre
@chetandhembre
i guess still i have some issue
from cacheops.simple import RedisCache
I am importing this
Alexander Schepanovski
@Suor
You can configure django with django.conf.settings.configure()
codegeschrei
@codegeschrei
Hey there! I just wanted to ask why caching in admin is turned off?
Alexander Schepanovski
@Suor
To be extra safe. And more for historical reasons, there were lots of limitations in invalidating m2m for example.
Another reason - caching for admin doesn't make sense anyway: low traffic, high updates, different queries than in the app. Useless bloat.
codegeschrei
@codegeschrei
Thanks for your fast response, too bad though, for my project it'd be a really good thing.
Alexander Schepanovski
@Suor
You can overwrite ModelAdmin.get_queryset()
Marcio Ribeiro
@b1n_twitter
How hard would it be to make cacheops work with Django 1.6?
Alexander Schepanovski
@Suor
You can just use cacheops 2.4.3
Marcio Ribeiro
@b1n_twitter
Will check it out, thanks
Shashank Parekh
@sp1rs
Small Issue.
Let say 2 things are running parallelly, first to get the object which is cached and second the object which is saving that object (That is invalidating the cache). So is it possible that before the get operation, the cache get invalidated and we get the wrong or nothing from the 1st operation?
Matthew Egan
@mattjegan
Hey, would anyone be able to answer this cacheops question? https://stackoverflow.com/questions/44821010/connecting-django-signal-handlers-in-tests
Alexander Schepanovski
@Suor
It's impossible to say anything without test code. Signal setup looks fine, you may just not using cacheops in your test code.
Sam Buckingham
@BuckinghamIO
Does cache ops potentially have issues with prefetch_related?
Alexander Schepanovski
@Suor
No
Abhishek Menon
@mav-erick
Hey guys. Amazing project! @Suor can i cache serializers if i am using DRF using cache ops?
Abhishek Menon
@mav-erick
I am running a multitenant application using Postgres schemas. The schema varies depending on the tenant. Will it cause problems when using this package?
Alexander Schepanovski
@Suor
@mav-erick as long as there are querysets inside it should work. Many people use cacheops with DRF just fine.
If you have the same SQL for different queries you will need to use cache prefix, see https://github.com/Suor/django-cacheops#sharing-redis-instance
Abhishek Menon
@mav-erick
Hi @Suor. Thanks for the info. One final question. Will the cache be invalidated with there are changes in a related model(Foreign keys and stuff) ?
Alexander Schepanovski
@Suor
Will be invalidated for any joined models via conditions. Won't be invalidated if .select_related() object changes. .prefetch_related() creates a separate query for related which is invalidated separately, so you might want to use that if the thing with .select_related() is an issue. See all CAVEATS here https://github.com/Suor/django-cacheops#caveats
Abhishek Menon
@mav-erick
Perfect. Thanks a lot!
Nikita Vilunov
@vilunov
Hiya all! Is it possible to keep the cache of an arbitrary function hot on time invalidation? I am caching some functions and a view. Currently I'm thinking about introducing a periodic celery task which invalidates that cache and fetches the view, but maybe there is a cleaner solution
Alexander Schepanovski
@Suor
Running a function after invalidation possibly via celery .delay() is the way to go. There is no any built in way to do that and there is no way to introspect what function results were just invalidated.
Alexander Schepanovski
@Suor
You may take a look at cache_invalidated signal if that helps.
BroCheng
@wang-xi
Does anyone konw the icon for django-cacheops?
Sam Buckingham
@BuckinghamIO
Anyone able to shed some light on how I could potentially get Cacheops to fail gracefully but quickly? currently it's incredibly slow if redis goes offline
I've tried overriding the redis class but cacheops makes so many requests that it negates it and I have no way or pushing the other cache hits over to a fallback cache or just turning off cacheops dynamically
It's caused by the timeouts it seems and even a 0.1 second timeout isn't exactly fast
This is in reference to issue #327 FYI
Alexander Schepanovski
@Suor
I don't know why it takes long, you should get connection refused almost immediately
BTW, I am not a big fan of this degrade on failure feature, I sometimes regret that I've added it. Still don't understand how people can use that, if your service is still functional without cache why even use one?