This is a migrated thread and some comments may be shown as answers.

Configuring Database Cache Provider in deployment

4 Answers 211 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 19 Nov 2014, 03:03 AM
So, sadly, it seems I cannot use the nice new Redis cache for Telerik reports, because there is no support for Sentinel, and so there is no good failover story for high availablity.
That means I need to use SQL server as the cache. The online help seems to suggest using some custom interactive utility to configure the DB. That is not an option for us, we do a headless automated install, there is no way we can add a manual "go run this tool" step.
So, now can Sql Server cache be scripted for Telerik Reporting cache?
Cheers
John

4 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 24 Nov 2014, 07:36 AM
Hi John,

Thank you for your interest in Telerik Reporting and the Reporting REST services cache management in particular.

On your question regarding the MS SQL database storage, the scripts are available in the MsSqlServerStorage Class article. You can test running them manually and adjust them for production. Then add custom logic for executing them once on starting the application in production.
Other option is to use the MsSqlServerStorage.CreateSchema Method. It executes the same script on the database provided in the constructor connection string.

The Redis storage implementation we ship uses the StackExchange Redis client as one of the common Redis client libraries. However it implements the public interface IStorage, which follows the built-in operations of the Redis storage, so you are free to provide different Redis storage implementation. The important here is that the service works with an IStorage instance which provides the locking mechanism.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
John
Top achievements
Rank 1
answered on 25 Nov 2014, 02:01 AM
So....I added the code to call CreateSchema...but I have to check first if it is created or it throws an exception. I guess I can do that, but it would be nice if CreateSchema was more friendly.
Also, the CreateStorage interface seems to be called a bunch of times...should I return the same MsSqlServerStorage instance each time, i.e. put it in a static variable? Or do you need new instances?
0
John
Top achievements
Rank 1
answered on 25 Nov 2014, 02:09 AM
In the course of rendering one report, CreateStorage was called no less than 14 times...
0
Stef
Telerik team
answered on 27 Nov 2014, 03:58 PM
Hello John,

The database must be created only once by using the provided tool or executing the scripts from MsSqlServerStorage Class article, for example when the application starts.

It is the expected behavior for the REST service that the CreateStorage method will be invoked multiple times and creating a new MsSqlServerStorage instance each time is not a performance hit.  The creation of the storage database is not included in the CreateStorage method as the method's purpose is only to provide a proxy for accessing an already existing database.

I hope this clears the misunderstanding.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Stef
Telerik team
John
Top achievements
Rank 1
Share this question
or