caching - nopCommerce not running modified controller method -


I am currently creating a webshop based on nopCommerce, but I need unique products per customer. To achieve this, I did edit the catalog controller to filter products according to my own database tables.

The code that I used for this works perfectly when running nopCommerce from Visual Studio 2013. The right products are displayed to each customer and no products are logged in when no one is displayed

I deploy nopCommerce on my local machine and then upload files on our (IIS7) webserver Make a copy, after which it works as expected (without restarting the server).

After restarting the webserver the problem starts, the web server restarts, every customer will always see every product.

For debugging purposes, I used to see an ActionFilterAttribute, then the function is still called (it gets called) and I added a log message to the run of the function The first line of the edit function to check and it has been found that the function has not run.

I suspect that the application caches the nopCommerce to the category page upon launching the application. I use nopCommerce caching but how do I cache or disable (either its part or completely caching off all together)

< Div class = "no information about the post can be found, address -text" itemprop = "text">

I wanted to disable all caching for testing purposes. I have just changed the following two rows (Nop.Web.Framework) to DependencyRegistrar.cs: ..

  builder.RegisterType & lt; MemoryCacheManager & gt; () As the & lt; ICacheManager & gt; () By name & lt; ICacheManager & gt; ("Nop_cache_static") SingleInstance () .; Builder.RegisterType & lt; PerRequestCacheManager & gt; () In form of. & Lt; ICacheManager & gt; () Name. & Lt; ICacheManager & gt; ("Nop_cache_per_request") InstancePerLifetimeScope () .;  

  builder.RegisterType & lt; NopNullCache & gt; () In form of. & Lt; ICacheManager & gt; () Name. & Lt; ICacheManager & gt; ("Nop_cache_static") SingleInstance (); Builder.RegisterType & lt; NopNullCache & gt; () In form of. & Lt; ICacheManager & gt; () Name. & Lt; ICacheManager & gt; ("Nop_cache_per_request") InstancePerLifetimeScope () .;  

This turns cash managers to a "non-caching" manager.

(I'm completely new on nopCommerce so there is something that I might have missed, but it works for me.)


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

android - how to get distance of 2 beacons and make a condtion base on that distance -