caching

Caching for anonymous users in django

回眸只為那壹抹淺笑 提交于 2020-01-03 08:27:22
问题 How would I go about caching pages for anonymous users but rendering them for authorized users in Django 1.6? There used to be a CACHE_MIDDLEWARE_ANONYMOUS_ONLY flag that sounded perfect, but that has gotten removed. I'm asking because every page has a menu bar that displays the logged in user's name and a link to his/her profile. What's the correct way of doing this? Must be a common problem, but I haven't found the right way from looking through the Django documentation. 回答1: this does not

Laravel deployment cache until server restart

风流意气都作罢 提交于 2020-01-03 06:04:11
问题 When I deployed my Laravel 4.2.9 application to a Ubuntu 14.04 server using Capistrano, it seems like all my php files are being cached by PHP, Laravel or Nginx. I have to manually restart the server to bust the cache and see any of my changes. Capistrano creates a new release directory on the server and runs a git checkout inside to get te last tagged version. When the deploy has been completed, the 'current' symlink will be updated to point to the the new release directory. The only shared

IVY Extends via ivy:resolve

一曲冷凌霜 提交于 2020-01-03 05:58:05
问题 We have recently introduced a common dependency in our build system which uses ivy:extends option within each individual ivy.xml. Common ivy.xml contents are as follows; common-ivy.xml <?xml-stylesheet type="text/xsl" href="http://repository.xyz.com/xsl/version-doc.xsl"?> <ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra"> <info organisation="XYZ" branch="MAIN" module="CommonDependencies" revision="1.0.0" /> <configurations defaultconfmapping="test->test(*);compile->compile(*

how to stop FLEX from caching?

不打扰是莪最后的温柔 提交于 2020-01-03 05:52:27
问题 i'm working with a flex app I didnt design myself, in fact i really don't know much about the workings of flex. I want to disable all caching since its causing a lot of problems since we changed to a new payment method. I know the disabling cache isnt ideal, but it just needs to be done for the moment. I found a server side solution for this, but my implementation of it doesn't seem to work. i tried setting it in the header, here's the piece of code for my index.html <head> <meta http-equiv=

Reflecting methods to clear Android app cache

一世执手 提交于 2020-01-03 05:32:28
问题 I am trying to clear the app cache of other android apps besides my own. To do this, I am using reflection on the PackageManager class. However, whenever I initialize the method before I invoke it, it always ends up being null. private void initiateClearUserData() { // Invoke uninstall or clear user data based on sysPackage String thePackageName; PackageManager pm = speedy.this.getPackageManager(); List<ApplicationInfo> installedApps = pm.getInstalledApplications(0); ApplicationInfo ai;// =

Cache images on php script

早过忘川 提交于 2020-01-03 05:12:10
问题 I am using this great randomizer code found here: http://alistapart.com/article/randomizer , but the images are not saved on the browser's cache which means they refresh whenever the site reloads. Is it possible to keep the images cached on the following code? The reason I am using this script is that php parse on css doesn't work on my server for some reason. <?php $folder = '.'; $extList = array(); $extList['gif'] = 'image/gif'; $extList['jpg'] = 'image/jpeg'; $extList['jpeg'] = 'image/jpeg

Spring Data Repository caching results

只愿长相守 提交于 2020-01-03 04:50:11
问题 I am a complete spring data noob. I have an interface as follows public interface UserBalanceRepository extends PagingAndSortingRepository<UserBalance, Integer> { @Cachable("UserList") @Query("select userId from UserBalance") List<Integer> ListUserIds(Pageable pageable); } My cache configuration looks like this: <cache:annotation-driven /> <!-- generic cache manager --> <bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager"> <property name="caches"> <set> <bean

404 Error When Caching .aspx Pages With HTML5 Cache Manifest

偶尔善良 提交于 2020-01-03 04:35:14
问题 Has anyone been able to cache .aspx pages using the HTML cache manifest? I am porting an html application over to asp.net (and mvc2) and I get a 404 error when trying to cache any *.aspx page. Other files still cache normally (.js, .css, etc). I have changed permissions, handlers, and file names and still no luck. Below is the actual manifest: CACHE MANIFEST # This file was generated at 2/28/2011 4:03 PM CACHE: /Content/Site.css /Content/Table_style.css /Scripts/jquery-1.5.min.js /Scripts

Class-cache not used when getting entity by criteria

元气小坏坏 提交于 2020-01-03 04:14:23
问题 I've set class-cache in nhibernate.cfg.xml file. When I get my entity by Id, I don't see SQL requests once object is loaded. But when I fetch entity using criteria, there is always SQL queries... EDIT: I guess this answers my question: http://www.javalobby.org/java/forums/t48846.html Let's say that we wanted to lookup entries based on a more complex query than directly by ID, such as by name. In this case, Hibernate must still issue an SQL statement to get the base data-set for the query. So,

FB iOS SDK Custom Token Caching issue

懵懂的女人 提交于 2020-01-03 04:12:05
问题 I am trying to build an iOS application with a custom token caching mechanism. I authenticate to FB on the device and I store the FB access token on my server against a session token on my server and then make FB API requests from the server. The FB Login works fine. I am able to cache the token onto my server. But the real problem happens when I run the app the next time after I logged into FB. This is the flow I follow to check if my app is logged into FB. 1) Hit a url on my server to get