Day 7 Dev Notes

The problem with architecting on the fly, is that it requires a lot of re-work as you work through the design of the solution and have to fix up previously written code. That's the issue I'm dealing with here, but this is all part of the learning experience.

I noticed some caching issues with the posts yesterday, after I was playing around with publishing future posts. This was caused by using the built-in local memory cache in Django, which is process-specific. I didn't really comprehend what this meant until I thought it through as part of my troubleshooting. The problem can occur when using multiple Gunicorn workers, since each one starts up its own process and thus has its own local memory cache. The impact of this is that each process could have a different cache depending on when the cache was set, and then on each page refresh you could see different posts depending on which process you're accessing.

Read more

Posted on Apr 30, 2024 by

Categories: Development