0

I've got Django running and caching into Memcached. I have some ajax actions on a page and when those actions are performed, and the browser refreshd, the CSS and JS files are no where to be found. They are gone in Firebug and the site is displayed with just the objects without any styling.

I turned off memcached and was unable to replicate the issue. I'm at a loss here, have you guys heard of anything like this with memcached before?

| improve this question | | | | |
1

Are you caching entire Django views in memcached? If so, are you also caching the AJAX view? At first glance it sounds like you might be overwriting the cached HTML view with the AJAX view, which does not include any media like CSS/JS.

Can you include example URLs (obfuscated if necessary) you are using for normal and AJAX requests?

| improve this answer | | | | |
  • The cache is set up in the Django settings and isn't specific on what it caches so I'm assuming everything, the schema is right out of the Django docs. docs.djangoproject.com/en/dev/topics/cache The AJAX that is happening is actually coded into an app I am using for flagging (Django-flag fork). It's all pretty stock, I haven't coded anything special into it. The view came with the app, the only thing I wrote is the template. It checks if the object can be flagged, and if it can't, which means it's already flagged, it shows a span of 'flagged' across it. – Jmichelsen Mar 5 '12 at 20:16
  • The fork can be found here. you can look at the code in entirety. github.com/svetlyak40wt/django-flag – Jmichelsen Mar 5 '12 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.