Are there any performance issues when using this method to retrieve a PageReference that contains workPageId and then getting a PageData using that reference?
I update some properties using sql and of course when retrieving the PageData using only the pageId I get the cached version and the update is not visible; While I'm at it, is there a way to force the invalidation of the cache for a page from sql (I think publishing a page will invalidate the cache so I am looking for a similar effect using an sql update)?
There is no way to invalidate the web application's cache from SQL Server. Be aware that writing to the database directly (i.e. not using the API's) is not supported and future releases my change the db schema.
What is it that you are trying to do?
A counter on a page(integer property) that has it's value modified by multiple users concurrently
Why not store in memory and then update the page's PropertyBag (DDS) like every 10 seconds or something instead of updating the DB all the time?
using CMS 5.2
In that case, you can create a custom table and use that instead of PropertyBag/DDS, use the pages GUID as a reference.
well I think the idea was that the editor must edit the counter value at some point and using an external table requires additional changes outisde page editing area.
anyway i went this route(using sp) and the values for the counter are correct in edit mode, the only problem is that i need to show the value of the counter to the users also by using sp to directly read from property table(I need to show the real time value not the cached value i get from using GetData() method); and at this point i wondered if it's a good ideea to use LoadPublishedVersion method to get the uncached version of the page that holds the counter property(this would not happen every time a page is served to an user because the counter property along with other properties are cached)