Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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?

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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