Expire cache on require.js data-main

How are you defining your require.config? I think for it to take effect before you import require.js, you need to code it like this: <script type=”text/javascript”> var require = { baseUrl: “/scripts/”, waitSeconds: 15, urlArgs : “bust=”+new Date().getTime() }; </script> <script data-main=”app/main” src=”https://stackoverflow.com/scripts/require.js”></script> Specifically, a an object named ‘require’ must be constructed before you import … Read more

Android Web-View : Inject local Javascript file to Remote Webpage

There is a way to ‘force’ the injection of your local Javascript files from local assets (e.g., assets/js/script.js), and to circumvent the ‘Not allowed to load local resource : file:///android_assets/js/script.js …’ issue. It is similar to what described in another thread (Android webview, loading javascript file in assets folder), with additional BASE64 encoding/decoding for representing … Read more

Architecture for Redis cache & Mongo for persistence

It is actually sensible to associate Redis and MongoDB: they are good team players. You will find more information here: MongoDB with redis One critical point is the resiliency level you need. Both Redis and MongoDB can be configured to achieve an acceptable level of resiliency, and these considerations should be discussed at design time. … Read more

PyPI is slow. How do I run my own server?

Do you have a shared filesystem? Because I would use pip’s cache setting. It’s pretty simple. Make a folder called pip-cache in /mnt for example. mkdir /mnt/pip-cache Then each developer would put the following line into their pip config (unix = $HOME/.pip/pip.conf, win = %HOME%\pip\pip.ini) [global] download-cache = /mnt/pip-cache It still checks PyPi, looks for … Read more

Installing memcached for a django project

Just do pip install python-memcached and you should be good. As for installing memcached itself, it depends on the platform you are on. Windows – http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/ OS X – brew install memcached Debian/Ubuntu – sudo apt-get install memcached On OS X/Linux, just run memcached in the command line.

Is System.Web.Caching or System.Runtime.Caching preferable for a .NET 4 web application

Microsoft recommends using System.Runtime.Caching for all caching purposes. See this: http://msdn.microsoft.com/en-us/library/dd997357.aspx Although, I have come across a couple threads where people are having issues with the MemoryCache.Default instance. After a while, it stops working properly. Any item you add using the Add or Set method does not actually get added to the cache. I tried … Read more