But if I override with UseRedis, everything is getting cached on redis server. I just want to cache custom tables on redis and rest all remains as is. That is, rest of the abp tables should be cached in-memory
You mean to say leave UseRedis commented right? Cause if we uncomment the code, all the caching is done on redis.
If we inject the AbpRedisCacheManager class, how can we define the connection string of the server. It always takes localhost:6379 as the connection string. My web server and the redis server would be placed on different physical servers. Below is the code snippet of the impelementation:
If I run it locally with redis server setup on my machine, everything is working as desired. But what if I want to point to a different redis server.
Thank you,
We have setup the caching of a particular table as mentioned and the same is getting cached as desired using the cacheManager.
While unit testing we came across a scenario. Post uncommenting the use of Redis as cacheManager, everything is getting saved on the redis server(setup on a separate machine as a windows service). THis includes the token validity key as well. THis key is being validated every time a api request is made from the ValidateToken method(JwtSecurityTokenHandler.cs file)
If for some reason the Redis service stops or the machine altogether reboots/shuts down, the entire site stops and the user is redirected to the login page.
THis is not the case if we have multiple web servers(load balanced) and we are using in-memory caching instead of Redis. We tried this by login into our website(the request is being served by server 1), browsing the website for a while. Then stopping the IIS of server 1 and trying to browse the site further, the request is automatically served by server2 without user getting throw out to the login page.
How can this be achieved when using distributed caching?
Also, is there a possibility that the system uses pre-defined in-memory caching for caching the token and abp tables, while for caching particular SQL tables we use distributed caching.
Hi,
we have decided to keep this issue on hold for a while as we have been busy working on other tasks. will send you the code as and when we are done with our on going release.
Thank you for the help.
Hi,
We have 2 load balanced web server and we need to implement distributed caching for some of the frequently used SQL tables. The documentation is not clear, https://aspnetboilerplate.com/Pages/Documents/v1.5.2/Caching
https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Infrastructure-Core-Mvc-Caching
We have uncommented the code for Redis in the pre initialize method of the webcoremodule.cs.
We have also setup the redis server as a windows service on a windows machine using the below link: https://github.com/MicrosoftArchive/redis/releases
how can we proceed further. How and where(in which project) can we actually write the code to set the cache with the data from SQL table.
Thanks for the analysis, we have checked our website and its functioning all normal with slowness in loading the login form. We are not getting any CORS error. Could you please try the secure url i.e.
https://idmsvnext.infogroup.com
We have deployed our website on an on-premise server and it is not hosted in cloud. When deployed in azure cloud, it seems all the bundles are gzipped and cloud itself is taking care of unzipping/caching the bundle files.
We checked the site you have deployed in azure and the bundle size for main.js is 4.5MB but it is cached. In our case the main.js is 4.4MB but evey time we are loading the landing page the file is getting downloaded and hence the slowness.
Hi,
Thank you for the quick response.
Below are the steps, how we are deploying the website:
{ "ConnectionStrings": { "Default": "Server=XX.XX.XX.XX; Database=TestDB; Trusted_Connection=False;User ID=TestUser;Password=xxxxx;" }, "App": { "ServerRootAddress": "https://localhost:XX", "ClientRootAddress": "https://localhost:XX/", "CorsOrigins": "https://localhost:XX/" } } 6) And below is the snippet of the appappconfig.production.json file
{ "remoteServiceBaseUrl": "https://idmsvnext.infogroup.com:XX", "appBaseUrl": "https://idmsvnext.infogroup.com:XX/", "localeMappings": { "angular": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" }, { "from": "es-MX", "to": "es" }, { "from": "vi", "to": "en" } ], "moment": [ { "from": "es-MX", "to": "es" }, { "from": "zh-Hans", "to": "zh-cn" }, { "from": "vi", "to": "en-gb" } ] } }
Hi,
We are using the latest version of ASPNETZERO and have created a website using the framework. The site takes more than 25seconds to load the login screen. Below is the performance graph and also the network traffic. We have not customized the login screen and using the default template.
This is very concerning, our application's performance needs to be almost instant. Please let me know what we should do to optimize the performance.
public site url: https://idmsvnext.infogroup.com
We are using Angular 8 version.