Tech Off Thread

10 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Caching BLOB data?

Back to Forum: Tech Off
  • User profile image
    jsampsonPC

    I just got done putting two days into a project to meet a deadline, and I'm just now thinking I screwed the entire thing up Smiley Fortunately, It doesn't matter too much, but I should still learn to fix the problem in the future.

    Are Blobs cached? I'm starting to think not - but can somebody lend some info?

  • User profile image
    littleguru

    Cached in which way? In which scenario?

  • User profile image
    jsampsonPC

    It doesn't appear to be that BLOB data is stored temporarily in memory, to retrieve it again if needed. Check out www.SusanEMyers.com - the site in question. I finished this tonight, but noticed that the pages ALWAYS load up a bit slower than desired. I'm assuming it's because I'm loading all of the gallery images as BLOB data, and they aren't being cached.

  • User profile image
    blowdart

    jsampsonPC wrote:
    
    Are Blobs cached? I'm starting to think not - but can somebody lend some info?


    No, but then no query results are, not without your help.

  • User profile image
    Ang3lFir3

    the site is written in PHP so i don't really see how they could be cached....... Caching of Blob data would only be beneficial at the "application" level here as the data still has to travel to the "application" from the datastore.....

    Its really not clear as to where you expect the caching to take place from your question.....

    If you were to use ASP.Net and you REALLY wanted to cache them on the server you could use the cache object and add an object that contains a collection of the images (tho honestly i woulda used file paths myself)

    this allows for the cache to expire etc... as well as be able to get (sql)dependancies and even specify a delegate to fire when the cached object is removed.....





  • User profile image
    littleguru

    blowdart wrote:
    
    jsampsonPC wrote: 
    Are Blobs cached? I'm starting to think not - but can somebody lend some info?


    No, but then no query results are, not without your help.


    Yeah. That was also my guess. Nothing is stored, without help...

  • User profile image
    blowdart

    Ang3lFir3 wrote:


    this allows for the cache to expire etc... as well as be able to get (sql)dependancies and even specify a delegate to fire when the cached object is removed.....


    Except of course SQL depedancies are ASP.Net 2.0, SQL 2005 only and bits need to be configured on the SQL server, and they're not that granular.

  • User profile image
    Ang3lFir3

    blowdart wrote:
    
    Ang3lFir3 wrote:

    this allows for the cache to expire etc... as well as be able to get (sql)dependancies and even specify a delegate to fire when the cached object is removed.....


    Except of course SQL depedancies are ASP.Net 2.0, SQL 2005 only and bits need to be configured on the SQL server, and they're not that granular.


    and to think i only added the sql bit to make sure no one said i left anything out....(why not sql2005.... Express in this case?).... unless of course you don't have control of the environment you are deploying to......

    incidently....you can use polling in sql 7, 2000, MSDE to get similar effect to sql2005's notification events

    http://www.eggheadcafe.com/articles/20060407.asp



  • User profile image
    blowdart

    Ang3lFir3 wrote:
    
    and to think i only added the sql bit to make sure no one said i left anything out....(why not sql2005.... Express in this case?).... unless of course you don't have control of the environment you are deploying to......


    For cache control? Express doesn't have notification services does it?

  • User profile image
    Ang3lFir3

    blowdart wrote:
    
    Ang3lFir3 wrote: 
    and to think i only added the sql bit to make sure no one said i left anything out....(why not sql2005.... Express in this case?).... unless of course you don't have control of the environment you are deploying to......


    For cache control? Express doesn't have notification services does it?



    Actually you are right it doesn't , not even with Advanced Services.... however you could still use Polling in that case to get the same effect....

    though with the 27 images in the gallery there really isn't much of a need for it..... just standard caching of the, as i suggest, filenames/paths for a period of 5 mins or more would be sufficient... wire up a delegate to retrieve all new values once the cache expires and you have a decent highperformance gallery cache....

    add the cache check to the master page of the site and populate the cache the first time anyone visits anypage in the site not just the gallery (this really wouldn't matter since you would test the site yourself the first time creating the first cache but its still kewl for something like this)

    Plus your management system can use the same delegate to populate the cache immediately with new data not needing to wait for the cache to expire....

    I think im talking myself into writing an image gallery LOL

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.