caching,typo3,typoscript,extbase,typo3-6.2.x , How to disable cache for a image carousel in TYPO3


How to disable cache for a image carousel in TYPO3

Question:

Tag: caching,typo3,typoscript,extbase,typo3-6.2.x

My TYPO3 extension has a lib that generates random 5 images from the total stock, for example out of the 100 images. This is done randomly every time the page is loaded. Only default the TYPO3 cache is enabled so every time the same 5 images are showed. As the lib is in the header of the website (so on every page) I don't want to disable the cache. How can I disable the cache of only this one lib?

TypoScript:

plugin.tx_ExtName.widgets {
  Slider = USER
  Slider {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    vendorName = Name
    extensionName = ExtName
    pluginName = Backend
    controller = Customers
    action = Slider
    switchableControllerActions {
      Customers{
        1 = Slider
      }
    }
    settings =< plugin.tx_ExtName.settings
    persistence =< plugin.tx_ExtName.persistence
    view =< plugin.tx_ExtName.view
  }
}

lib {
    slider < plugin.tx_ExtName.widgets.Slider
}

Answer:

in your ext_localconf.php there, where you added your plugin make an usage of the 4-th param of configurePlugin method

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
    'Vendor.' . $_EXTKEY,
    'PluginName',
    array('Customers' => 'slider',),
    array('Customers' => 'slider',) // List non-cachable action(s)
);

Of course fix the VendorName and PluginName to your own. It will cause that plugin's actions won't be cached, while whole page will be kept in cache still.

Alternative solution

You can also use JavaScript for this, just place an JS array of paths in the source code and choose 5 random items on document load it will allow you to avoid non-cached content.


Related:


Yii2 : how to cache active data provider?


php,caching,yii2,dataprovider
In my PostSearch model I have this code : public function search($params) { $query = Post::find()->where(['status' => 1]); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort'=> ['defaultOrder' => ['id' => SORT_DESC]], 'pagination' => [ 'pageSize' => 10, ] ]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere([ 'id' =>...

'str' does not support the buffer interface with Memcached


python,django,caching,memcached,python-memcached
I am using django 1.7 with python3.4. I recently installed Memcached and am trying to use it with python-memcached as per site cache. But once I define the default cache backend in the settings.py, my application stops working throwing this error: 'str' does not support the buffer interface The installed...

PlayFramework 2.2.6. Default cache expiration


java,caching,playframework-2.2
I would like to store Java object in cache for user session. I would like to know what is default cache storage timeout. I user log in on 8.00 am I will store his user object in cache. Will it keep f.e. 10 hours until user will logout? Will be...

Does Python have a default Caching service


python,python-2.7,python-3.x,caching,local-storage
Similar to redis and memcache, does Python by default has a caching attached to its run time environment? This has to be local caching. I need to know without installing or invoking any other libraries, can I cache some data using the existing Python installation in my system. I need...

yii2 disable page cache on post request


php,caching,yii2,yii2-advanced-app
I have a page where I submit a form that I want to cache but only for get requests. I cannot figure out if there is a way to do this but the Yii2 guide seems to hint at it http://www.yiiframework.com/doc-2.0/yii-filters-pagecache.html#$enabled-detail, it says you can enable it only for Get...

App Not Downloading Newest Version Of File [Java]


java,caching,download
Okay, I've been trying to figure this out for a few hours and it's starting to kill me. I wrote a primitive version checker for an app I work on every once and awhile. It's just a simple for fun project. The version checker has been a pain though. It...

Caching Views in XAML changes appearance?


xaml,caching,windows-store-apps
I'm caching Views in XAML in order to improve performance (don't need to load the controls again). Does this make sense / improve performance of loading controls? Problem is, although I'm caching / loading the same thing, it seems when I use the Cached View, it has a different appearance....

How to assign variable in fluid?


typo3,fluid,view-helpers
I want viewhelper that can be helpful to assign variable in fluid, I dont want variable to be passed from controller.

Unzipping Multiple Files - Java


java,caching
I'm working on an auto updater for a game client and I've run into an issue. What I need it to do: Download cache.zip and client.zip. Extract cache.zip to cacheDir and extract client.zip to the same location they are running the jar(game). What it does right now: Downloads both cache.zip...

Hibernate Query cache invalidation


java,hibernate,jpa,caching,concurrency
I am using Hibernate(with JPA) in an application that has a high write-read ratio. For caching I have enabled query-cache and hibernate second level cache(ehcache). The problem I am facing is due to automatic query cache invalidation when an update is done. Is there any way to configure query cache...

Cache ruining Jquery Code?


javascript,jquery,caching
My problem might be naive, but basically I have a simple Jquery script running on a site to determine the margin height of divs based on the contained image's height: <script type="text/javascript"> $('.artobject').css('margin-bottom',$('.img-wrap').height()); </script> The problem is that it runs once, but after the page is reloaded the code begins...

Is processor cache flushed during context switch in multicore?


caching,multicore,volatile,flush,context-switch
Recently, I discussed why there is a volatile mark at seq in Java Actors demo @volatile private var seq = 0L private def nextSeq: Long = { val next = seq seq += 1 next } One answer was that threads can be migrated and variables lost (other cores will...

Are cache-line-ping-pong and false sharing the same?


caching,multicore,computer-architecture,processor,false-sharing
For my bachelor thesis I have to evaluate common problems on multicore systems. In some books I have read about false sharing and in other books about cache-line-ping-pong. The specific problems sound very familiar, so are these the same problems but given other names? Can someone give me names of...

OpenLayers 3 - retina vs cached tiles


caching,openlayers-3,geoserver,retina
I have an application which serves some layers from GeoServer (GeoWebcache) tile cache. By default it stores them in 256*256 pixel resolution but the ol.source.TileWMS source requests 512*512 pixel ones when using a retina Macbook Pro which causes the server to reply: 400: The requested tile dimensions 512x512 do not...

How to use a dynamic value for cache key with ActiveModel::Serializers (v0.10.0.rc1)


caching,active-model-serializers,rails-api
I am using a database-driven solution for labels and translations that I would like to cache at the serializer level. Here is my serializer. class AppLabelSerializer < ActiveModel::Serializer cache key: 'app_label', expires_in: 3.hours attributes :id, :key, :label, :label_plural def key object.app_label_dictionary.key end end The problem is that I need to...

Cache inconsistency - Entity not always persisted in cached Collection


java,hibernate,jpa,caching,ehcache
I'm having an issue where a Validation instance is added to a Collection on a Step instance. Declaration is as follows: Step class: @Entity @Table @Cacheable @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class Step extends AbstractEntity implements ValidatableStep { @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) @JoinColumn(name = "step_id", nullable...

Website html doesnt update for users because of cache


html,caching,browser-cache
I am making a website and am running into an issue with website cache for my users. I develop my website and have set chrome developer tools to disable cache for my website for development. The issue is when i release a new change to prod all my users don't...

Prevent Caching of PDFs in ASP Classic


pdf,caching,asp-classic
I just started to manage a website for the company I work for and it is still running with ASP Classic so I have had to learn quite a bit. Recently our managment has started to post a dynamically updated PDF to the website every few hours. The problem I...

Typoscript add class to the first element using stdWrap


typo3,typoscript,typo3-6.2.x
I have a custom requirement to display an image slider using TypoScript. The images are taken from default tt_content image content element. I've added the following TypoScript code to implement this; lib.homeslider = COA lib.homeslider { 10 = CONTENT 10 { table = tt_content select { where = colPos =...

How to get typo3 settings in the utility files?


php,typo3,fluid,extbase
plugin.tx_xxx { setting { storagePid = 23 } } I want this typo3 settings in utility file. Please help me....

Angular ng-repeat cache (avoid re-rendering on state change)


javascript,angularjs,performance,caching,angularjs-ng-repeat
We have huge rendering spikes with ng-repeat in Angular application. Main page shows a huge list of cover images ("::" and "track by" are in place). On first load it works acceptable. But if user changes the state (we use UI-Router) and goes back to the home page afterwards then...

How can I cache my website in the user's browser?


javascript,html5,caching
I've found many explanations about caching, some of them even have examples but, it is kind of foggy to understand it and how to use it. I've tried to use it many times, but I've failed (I want to improve speed, I want only the necessary to be loaded from...

Detemine memory used by Hazelcast cache


java,caching,memory,hazelcast
I'm implementing the backend of a game in Java and I was told to use Hazelcast to cache some data from the database. How could I find out how much memory is used by the cache (necessary to determine the business cost of this solution)?

How to call posts from PHP


php,wordpress,caching,cron,call
I have a website, that uses WP Super Cache plugin. I need to recycle cache once a day and then I need to call 5 posts (URL adresses) so WP Super Cache put these posts into cache again (caching is quite time consuming so I'd like to have it precached...

How to get Query object to felogin repository?


typo3,typo3-6.1.x
i need Query object of TYPO3\CMS\Felogin\Controller\FrontendLoginController in my extention repository so i can create my own query conditions.

Generic Object Cache


c#,linq,caching
I am working on a project where I plan on using Redis as persistent data storage, however the task at hand, I am working on a generic Object cache. and as a huge fan of LINQ I have started designing a cache which does support this. public ConcurrentBag<Object> Cache =...

Typo3 6.2: “Could not find a suitable type converter for ”String“ ” exeption after update


php,typo3,typo3-6.2.x
Typo3 was from a very old version updated to Typo3 6.2. The most things are working now, but I have one own written extension that give me the following error: Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1297759968: Exception while property mapping at property path "":Could not find a suitable...

“client not initialized” error when using SSMCache with AWS elasticache autodiscovery


caching,amazon-web-services,amazon-elasticache,spring-cache
I am using Spring cache with AWS elasticache provider. I get this warning: WARN c.g.code.ssm.spring.SSMCache - An error has occurred for cache defaultCache and key java.lang.IllegalStateException: Client is not initialized at net.spy.memcached.MemcachedClient.checkState(MemcachedClient.java:1623) ~[elasticache-java-cluster-client.jar:na] at net.spy.memcached.MemcachedClient.enqueueOperation(MemcachedClient.java:1617) ~[elasticache-java-cluster-client.jar:na] at net.spy.memcached.MemcachedClient.asyncGet(MemcachedClient.java:1013)...

scalacache memoization asynchronous refresh


scala,caching,memoization
I'd like to do a TTL based memoization with active refresh asynchronously in scala. ScalaCache example in the documentation allows for TTL based memoization as follows: import scalacache._ import memoization._ implicit val scalaCache = ScalaCache(new MyCache()) def getUser(id: Int): User = memoize(60 seconds) { // Do DB lookup here... User(id,...

How to cache Exchange web service API autodiscoverurl?


c#,asp.net,caching,exchangewebservices
https://msdn.microsoft.com/en-us/library/office/dn659837%28v=exchg.150%29.aspx According to link above, we can caching the information for Autodiscover. The question is: 1) Should i serialize ExchangeService object to xml or just cache some of the properties (which properties) ? (I want to improve performance of the system because autodiscoverurl is too slow)...

Caching in Webview is not working in Android


android,caching,webview,browser-cache,offline-caching
When I open webview, it runs great when there is a network connection, but I have enabled caching in it, and without a network connection, it shows an error and loaded cached web page is not showing. I have enabled caching and also set cache mode, but it's not working....

How to omit creating static Map for data caching?


java,caching,static,hashmap
I want to know if it is possible to omit creating cache with static Map instance. Here is snippet of my class: public class XpathEvaluator { private DocumentBuilder builder; private XPath path; private Document document; private static Map<String, List<String>> cachedXpaths = new HashMap<>(); private XpathEvaluator() throws ParserConfigurationException { DocumentBuilderFactory factory...

Cache expires although explicitly set not to expire


c#,asp.net,caching
I have plenty of available ram (about 25 GB of free memory) and I don't want the cache to expire and I just remove and recache items when there is a change.As my website is in testing process it has 1 or 2 KBs of cached items but when I...

Caching issue in angularJS application


angularjs,caching,orm,eloquent,slim
I've an admin panel which is a pure angularJS application, which uses REST api for data manipulation. REST api is built using SlimAPI framework and Laravel's Eloquent ORM. I'm facing caching issue in admin panel. Even though if a add new content to the system, it'll not show up in...

Django localmem size


python,django,caching
What is the default size of the local memory cache for Django. https://docs.djangoproject.com/en/1.8/ref/settings/ does not mention any. https://docs.djangoproject.com/en/1.8/topics/cache/#cache-arguments says it is 300, but the following code always returns a different value: for i in range(0, 10000): cache.set(i, i) first = cache.get(0) if first is None: print i break I have...

Android picasso cache images


android,caching,picasso
In documentation in written that picasso caches images downloaded , but i havent seen an example how to call that image again from cache. Here i first time load the image : Picasso.with(getActivity()) .load(thirdArticle.getImageURL()) .resize(200, 150) .centerCrop() .into(mainThreeArticleImage); Second time when i call same code above it shouldnt get from...

Does setting beresp.ttl to 0s replace previous cache?


caching,varnish,varnish-vcl
I have this issue, I use Varnish 3.0 and I want to avoid caching errors. I'm aware that this piece of code should do it: if (beresp.status >= 500) { set beresp.saintmode = 2m; if (req.request != "POST") { set beresp.ttl = 0s; return(restart); } else { set beresp.ttl =...

In what use cases is locking on ASP.NET cache required/desirable


c#,asp.net,caching
When inserting and retrieving items into cache. Is it best practice to perform a lock on the cache. I've following the guidelines from the following post. What is the best way to lock cache in asp.net? But i'm keen to get some context on whether i need to lock or...

AFNetworking 2.0 Cache Issue


ios,objective-c,caching,afnetworking
Does AFNetworking cache still work for objective-C? I have been trying to cache API response using AFNetworking, but it seems not to work anymore. AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSString *requestURL = [NSString stringWithFormat:@"http://ssssssssss.com"]; manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; [manager.requestSerializer setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; [manager GET:requestURL parameters:nil...

What does `expires -1` mean in NGINX `location` directive?


caching,nginx,cache-control
Given the sample location example below, what does -1 mean for expires? Does that mean "never expires" or "never caches"? # cache.appcache, your document html and data location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; access_log logs/static.log; } https://github.com/h5bp/server-configs-nginx/blob/master/h5bp/location/expires.conf...

PHP How to not cache generated HTML but cache static data like images/js/css


javascript,php,css,image,caching
Many PHP developers add the no-cache header on top of their PHP pages, so do I, for obvious reasons. Since PHP generated content is usually dynamic, having the browser cache them results in outdated data being presented to the user. To avoid this caching is usually disabled. <?php //no cache...

Can the HTTP method “PATCH” be safely used across proxies etc.?


http,caching,filter,proxy,http-patch
Suppose my server exposes an HTTP-based API that uses the PATCH method introduced by RFC 5789. Is it possible that clients (browsers or otherwise) behind corporate firewalls, proxies, caches, parental controls filters and the like will encounter any problems using this method? If so, how likely is this? Given that...

Niginx location with cache for a specific url with params


caching,nginx
I'd like to use nginx cache for a specific url only The url is /ajax/airport and must contain the parameter ?geoloc=1. Cache is working fine, the only issue I'm facing is to get it working for an url containing the given parameters. Here is my nginx site.conf file: server {...

Elastic Beanstalk Prevent Files Overwriting


wordpress,git,caching,amazon-web-services
So a little background i am trying to setup a local staging and production environment using Elastic Beanstalk and Wordpress. So i have a local environment setup with git and i have the following in the .gitignore. ################# ## WordPress ################# .git-rewrite/ local-config.php .elasticbeanstalk/ Linux/ I have the ELB CLI...

Understanding Memory Replays and In-Flight Requests


caching,cuda
I'm trying to understand how a matrix transpose can be faster reading naively from columns vs. rows. (example is from Professional CUDA C Programming) The matrix is in memory by row, i.e. (0,1),(0,2),(0,3)...(1,1),(1,2) __global__ void transposeNaiveCol(float *out, float *in, const int nx, const int ny) { unsigned int ix =...

Why does the expiration date of the request cache lie in the past?


firefox,caching,firebug
I am working on caching some pages and I noticed this in Firebug: So it says that the cache expired 45 years ago. Is this a bug or some bad data? I have another page that is caching correctly I just do not understand why its saying Expires ... 1970....

Replace URLs in Typo3 DB


mysql,database,typo3
So I have a Site created with Typo3. I also have a domain which is linked to the folder of the Typo3 Installation. www.example.org I created a Subdomain and linked it to the same folder and used the Main Domain for something else. But now everything on the Subdomain still...

The process cannot access the file because it is being used by another process asp.net [duplicate]


c#,asp.net,asp.net-mvc,caching,system.io.file
This question already has an answer here: “The process cannot access the file because it is being used by another process” with Images 6 answers I have the following method which resizes a given image and caches it [OutputCache(Duration = 3600, VaryByParam = "id")] public ActionResult UserFace(int id) {...

How can clear apache cache?


apache,caching
How can I clear apache cache in xammp? I tried the 'htcacheclean -r' command, but it's always generated error. If I know well the apache can't cache the files/ scripts, but a system administrator said this: 'The apache casheing the site, so clear the apache(!) cache.'. ...

Where are TYPO3 constants from constant editor stored?


typo3,constants
In Typo3 Backend -> Template -> Constants there is a constant editor. Where does TYPO3 saving the constants? Tried an fgrep -ri for an existing pattern, in case of saving to filesystem - no matches. Tried an MySQL search for an existing pattern, in case of saving to DB -...