DataSource Controls :: Nhibernate Second Level Cache?

Apr 17, 2010

i am trying to use nhibernate second level cache, i have configured my cfg as

<property
name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider,NHibernate.Caches.SysCache</property>
<property
name="cache.use_query_cache">true</property>
<property
name="cache.use_second_level_cache">true</property>
<property
name="cache.default_expiration">120</property>

and also enable cache in presistent class as <cache
usage="read-write"/>

now what steps i have to take to check whether the cahce is working or not, do i have to write some C# code for cache?

View 2 Replies


Similar Messages:

C# - Disabling Page Level Cache/Dangers?

Mar 9, 2011

Basically, the reason I am disabling the cache is because I have DevExpress ASPxGridViews, which work great for filtering, sorting, etc. but the client is working with large amounts of data and has requested that we save the filter/sort between page navigations.

The way this is done is via an event that occurs, ClientLayout. The problem is, when the user navigates to a different page, and then clicks the browsers Back button, the events do not fire, and the unfiltered grid is displayed, presumably because this is what was cached. (However a link back to the grid's page causes the page to load properly, and the events to fire.)

The only way I have been able to solve the problem is to disable caching as pointed out in this link:
http://forums.asp.net/p/1304752/2563283.aspx

Obviously, just because I CAN do it, doesn't mean its a good idea. I understand it might affect performance a bit, but can anyone tell me of any other problems that might occur? Maybe AJAX problems or controls giving out unexpected behaviour?

View 1 Replies

DataSource Controls :: Error Handling At Datasource Level

Jun 19, 2010

I have a website which displays news information. It displays the titles at the default (home) page and when click it shows the full story.

I use object datasource to load the news titles.

Now, sometimes the database server lose its connection or changes to the database and it affects the whole website because error is reported at the Application level. I would like the Home page to still show but the section where the news titles usually appears will now show an error message that the database is down (Refer below my part of my code).

How can I achieve that?? I tried to do that at the page_error level but it displays nothing. I don't want to pass the error to application level, I want to handle at datasource load/binding level so that it display this error message at the news section and other home website information can still be shown.

[Code]....

View 1 Replies

DataSource Controls :: Getting Started With Nhibernate

Feb 8, 2010

give me an example of foreign key mapping & class description cause I don't get it.

View 4 Replies

DataSource Controls :: How To Use Nhibernate - Framework

Mar 15, 2010

How to use Nhibernate give step by step description and what are required tools needed for implemented including dotnet framework

View 1 Replies

DataSource Controls :: Which Version Of Visual Studio 2008 Use For NHibernate

Jan 16, 2010

Which version of Visual Studio 2008 do you currently use with NHibernate? I would like to test out NHibernate at home, but I'm not sure if I want to shell out $500 plus for VS 2008 professional edition. Has anyone had any luck with NHibernate on VS 2008 standard or even one of the VS express editions?

View 4 Replies

DataSource Controls :: Cache Behaviour In SqlDataSource?

Jan 14, 2011

I have SqlDataSource in 2 pages: Page1.aspx and Page2.aspx. I setup all SqlDataSource with EnableCaching is "True" and CacheDuration is "Infinite", same setup for all 2 SqlDataSource as below:

<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"[code]....

When visitor access Page1.aspx, the SqlDataSource in Page1.aspx will access SQL server to retrieve database and cache the database.

Question-1: After accessing Page1.aspx, then the visitor access Page2.aspx. Will visitor access again SQL Server database in Page2.aspx?

Question-2: One cache at one SqlDataSource is for one page and for one user? Or, one cache at one SqlDataSource is for multiple pages and for one user? Or, one cache at one SqlDataSource is for multiple pages and for multiple users?

View 3 Replies

DataSource Controls :: Maximum Stored Procedure, Function, Trigger, Or View Nesting Level Exceeded (limit 32) ?

Feb 24, 2010

I have a table with recursive relation,a function and a sp for readig data from that table:

[Code...]

When I execute sp,I got this error:Maximum stored procedure,function,trigger or view nesting level exceeded (limit 32).

View 9 Replies

DataSource Controls :: Preventing SqlCacheDependency From Invalidating A Cache Item While It Is Being Set?

Feb 9, 2010

I think it is a problem that SqlCacheDependency may invalidate a cache item while it is being set:

function getCacheItem()
if cacheitem is empty
cacheitem = something
AND AT THIS POINT SqlCacheDependency INVALIDATES THE cacheitem
end if
return cacheitem
end function

how can we prevent this? Is it somehow possible to specify a ReaderWriterLockSlim for the SqlCacheDependecy to use?

View 1 Replies

DataSource Controls :: SQLCacheDependancy Invalidates Cache Immediately SQL Server 2005?

May 13, 2010

I'm having a real problem trying to get the SQLCacheDependancy working, whenever I add data to the Cache with a SQLCahceDependancy it is invalidated almost immediately. So when I try to access that cache key again it is always null.

My setup is as follows: SQL server 2005 (on remote machine)

Visual Studio 2005 ASP.NET 3.5 on Windows XP Machine.i have run the following script on the DB to set up permissions etc (these script are from various post):

-----------------------------------------------SQL Scripts start -----------------------------------------------------------------------------------------

use db_Company;
ALTER DATABASE db_Company SET ENABLE_BROKER;
[Code]....

View 4 Replies

How To Use Higher Level Datasource In Custom Usercontrol

Jan 13, 2010

I'm setting up a web application with multiple forms. Each form is defined within an asp:FormView with the DataSource set to an ObjectDataSource. Each form contains it's own set of fields and always contains one or more blocks of fields, which are the same for multiple forms.

Because this blocks are the same, I decided to define them in a custom usercontrol. The questions that came up with this:

How can I use the same datasource for the input fields in the usercontrol as in the 'higher' asp:FormView?

Is it possible to use DataBinding.Bind() for the input fields in the usercontrol, with this same datasource?

View 1 Replies

Web Forms :: Handle Error On Page Level Or Application Level?

Jan 31, 2011

I have to handle error related to web application. I am not sure how its works. I am thinking that I will add an error page (error.aspx) and in global.asax ,application_onError, I will redirecting the user to error page and that should be enough ! i mean it will handle error automatically.

View 4 Replies

Iis7 - Configuration Granularity Between Machine - Level And Site - Level?

Apr 29, 2010

I want to be able specify to do the following: Specify configuration settings such as appSettings and connectionStrings for multiple web apps in IIS7 No editing Machine.config or the machine-level web.config Web apps are distinct web sites in IIS (not subfolder apps) Is this possible without just duplicating the configs for each app?

View 1 Replies

Sql - Cache And Output Cache For Controls?

Oct 28, 2010

You know I have the way to Cache the data I've got from the SQL Server over data caching. In addition I can output cache web user controls.Whats about a web user control contains data from a SQL database? Does it make sense to cache the data and also cache the control?What is the best solution for the combination of these two components?

View 1 Replies

Custom Server Controls :: How To Programmatically Cache A Server Control And Add A Cache Dependency?

Feb 11, 2011

I have a server control that I developed which generates navigation based on a third party CMS API. Currently I am caching this control using the PartialCaching attribute. The CMS uses cache key dependencies to invalidate the cache when a user makes an edit, however in the case of my server control it does not get invalidated and the updated navigation will not show up until the cache expiration set by the PartialCaching attribute.Here is my two part question:

What is the proper way to programmatically cache a server control, without using the PartialCaching attribute, and adding a cache key dependency?

Is it possible to continue to use the PartialCaching attribute and add a cache key dependency?

View 2 Replies

AJAX :: Cache A DropDownList Datasource In The Browser?

Jun 14, 2010

I have a form that has n dropdownlists, and the form has gotten so big that it now weights over 1.2MB...I was wondering, is it possible to load the datasource items once in the browser and have all related dropdownlist use that single datasource to conserve bandwidth?Something like, load datasource into div, and on page_load have all dropdownlist load from that div...

View 1 Replies

C# - Implement System.Web.Caching.Cache Object In A Controller To Cache Specific Query?

Mar 29, 2010

Is it correct to implement my caching object like this in my controller :

[code]....

And I Use it like this :

[code]....

View 1 Replies

Architecture :: Cache The Full List Of Objects In Http Cache On The Service Tier And Page In Memory?

Feb 25, 2011

We have a wfc layer that wraps the business classes and database access and use a client that lives on the database layer. Amongst our group we are attempting to form standards. Some want to have the client call the web method and pass the page they are requesting and the page size. Pass that to the database and then page in SQL Server use RowNum.Some want to cache the full list of objects in http cache on the service tier and page in memory. They concern here is memory use on the server.

Which would be best for a medium number of users with potentially large number of records to manage (say 30K) Is it better to cache them all in memory and work from there or page at the database as the application scales?

View 1 Replies

New-Cache Parameters For AppFabric Cache When Storing.NET Session State

Jul 28, 2010

What are the "optimal" parameters for creating an AppFabric cache when you will be storing session state in the cache? MSDN Cache-Related Commands

Powershell command line:

New-Cache [-CacheName] <String> [-Eviction <String>] [-Expirable <String>] [-Force [<SwitchParameter>]] [-NotificationsEnabled <String>] [-Secondaries <Int32>] [-TimeToLive <Int64>]

[code]...

Since I don't want my sessions to be removed unless the session has been abandoned either via code or Session Timeout...For eviction, I would think "None" and for expireable, I would think False.I have tested and calling Session.Abandon does remove the object from the cache. I have also tested to see if by extending my session, the session object in cache is also extended. This does seem to work the "correct" way.

View 1 Replies

Data Cache Support Background Population Of Cache Entries?

Aug 1, 2010

We have a data driven ASP.NET website which has been written using the standard pattern for data caching (adapted here from MSDN):

public DataTable GetData()
{
string key = "DataTable";
object item = Cache[key] as DataTable;

[code]...

The trouble with this is that the call to GetDataFromSQL() is expensive and the use of the site is fairly high. So every five minutes, when the cache drops, the site becomes very 'sticky' while a lot of requests are waiting for the new data to be retrieved.

What we really want to happen is for the old data to remain current while new data is periodically reloaded in the background. (The fact that someone might therefore see data that is six minutes old isn't a big issue - the data isn't that time sensitive). This is something that I can write myself, but it would be useful to know if any alternative caching engines (I know names like Velocity, memcache) support this kind of scenario. Or am I missing some obvious trick with the standard ASP.NET data cache?

View 3 Replies

C# - Maximum Length Of Cache Keys In HttpRuntime.Cache Object?

Feb 24, 2010

We are using HttpRuntime.Cache API in an ASP.NET to cache data retrieved from a database.

For this particular application, our database queries feature a LOT of parameters, so our cache keys look something like this:

table=table1;param1=somevalue1;param2=somevalue2;param3=somevalue3;param4=somevalue4;param5=somevalue5;param6=somevalue6... etc...

we have so many parameters that the cache key is several hundred characters long. is there a limit to the length of these cache keys? Internally, it is using a dictionary, so theoretically the lookup time should be constant. However, I wonder if we have potential to run into some performance/memory problem.

View 1 Replies

ADO.NET :: Use HttpContext.Current.Cache (system.web) For Cache Data Something In Project

Sep 13, 2010

I have use Nhibernate in my MVC Project by me known, Nhibernate have cache on Session and Object. now, I want use HttpContext.Current.Cache (system.web) for cache data something in project. my code same that have problem, haven't it. and that's right or wrong.

View 2 Replies

Architecture :: Distributed Caching / Keeping Cache In Sync Between Multiple Webservers Or Even Better Farm Cache Management To Another Server?

Feb 26, 2010

I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.

This works great for session state but my next challenge is Cache

My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.

There are two challenges that I face

1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.

2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.

For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.

My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.

Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?

View 2 Replies

Is Page Output Cache Stored In.NET Cache Object?

Nov 2, 2010

I need to enable caching in my asp.net application, but I do not want to use the webserver's memory for holding cache objects. If I add the page directive for output caching will the page be stored in the asp.net cache object?

View 2 Replies

C# - Application_End() Cannot Access Cache Through HttpContext.Current.Cache

Dec 12, 2010

I want to be able to maintain certain objects between application restarts.

To do that, I want to write specific cached items out to disk in Global.asax Application_End() function and re-load them back on Application_Start().

I currently have a cache helper class, which uses the following method to return the cached value:

return HttpContext.Current.Cache[key];

Problem: during Application_End(), HttpContext.Current is null since there is no web request (it's an automated cleanup procedure) - therefore, I cannot access .Cache[] to retrieve any of the items to save to disk.

Question: how can I access the cache items during Application_End()?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved