Re: System Cache and expiration

Tech-Archive recommends: Speed Up your PC by fixing your registry



Tom,

In .NET 2.0 you can use SqlDependency to trigger the clean out of expired
cache objects.
In .NET 1.1, you would need a trigger to touch a file on the file system,
and use FileDependency instead.

As far as the rest of your question goes, it is hard to comment on it
without seeing the exact table structure, and why just a record, why not the
entire table (in short I'm a bit unclear on the rest to pass any comment,
though I'm guessing a better solution may exist).

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
---------------


"tshad" <tscheiderich@xxxxxxxxxxxxxxx> wrote in message
news:uM2rbaooFHA.2156@xxxxxxxxxxxxxxxxxxxxxxx
> I was discussing a question in the Sql Server group on how to handle
Stored
> Procedure and how many to have as well as whether or not to read a whole
> record into my page if I only need a few fields out of it.
>
> The reason being that I could have 15 pages all wanting different types of
> data and this would require 15 different SPs. Or I could just have one
> stored procedure that reads the whole record and always read that one and
> grab what you need. The problem here might be networking issues on
sending
> large amounts of data when just a few fields will do.
>
> The question was do I create another SP each time I create a new page that
> needs an extra field from the other SPs, or just read the whole thing.
>
> One of the solutions was to read the whole thing into a class and cache
the
> class (session), but the problem was how do I handle changes (updates,
> deletes) that may hit that record from another users.
>
> His other solutions was:
>
> > If there are concurrency issues, then don't use Session: use the system
> > cache (or Application). With the system cache, you can set an expiration
> > time on the objects stored there, as well as including code to flush the
> > class from the cache when an update occurs.
>
> I was wondering how I would do this, to have an update trigger the
deletion
> or reload of an object in the system Cache.
>
> Also, is the system Cache the same as the Application?
>
> Thanks,
>
> Tom
>
>


.



Relevant Pages

  • Re: Accessing ASP.NET Cache
    ... > user makes a change to a particular table in a SQL Server database (so ... > the changes appear immediately in the browser). ... particular table then create the cache with filedependency on ... Write a trigger that always overwrites this blankfile ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: to work with database...
    ... cache to run this procedure, trigger, or SQL batch. ... ask your SA to reconfigure ASE with more procedure cache. ... Retry later, or ask your SA to reconfigure ASE with more ...
    (comp.lang.java.programmer)
  • Re: insert trigger problem
    ... Yes I think I got it - It's a good trick to keep the right value in ... > thing your trigger do be: ... this is what is cuasing the problem. ... you MUST contrive to cache @@IDENTITY coming into your trigger ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Slow Filesystem I/O
    ... Get a bunch of cache and battery backup and you can mask ... > disk by a factor of less than 10. ... > system cache gets you in terms of avoiding bottlenecks. ... going to compete in terms of quantity. ...
    (comp.os.vms)
  • Re: How best to use php5 objects between pages?
    ... > or cache storage (PHP-APC cache can provide this, ... 1.He can use APC cache instead of dealing shared memory by himself. ... session files or databases. ... Session files are relatively secure. ...
    (comp.lang.php)