If you want to build a website/mashup using 10+ services (twitter, facebook, linkedin, github, stackoverflow, etc.), and you also want to optimize your application...
Can you check if a URL's content is expired, without having to GET all of the pages content? If you could do that, then you could keep a local cache of their content in y...
We have a PHP website like reddit, users can vote for the stories.
We tried to use APC, memcached etc. for the website but we gave up. The problem is we want to use a caching mechanism, but users can vote anytime on site and the cached data may be old and confusing for the other visitors.
Let me explain with an example, We have an arra...
Under one UnitOfWork (session) I may call CreateCriteria twice. My first call is to populate a grid for data editing. Let's say the data has been edited and flushed (saved) to the database and the grid is still open. After the data is edited, I may call CreateCriteria a second time to retrieve a list of objects that are validated and fou...
The problem is how to do it efficiently when checking whether the cache has expired?
Can you explain with some really basic demo?
...
I'd like to do the same thing that they're doing here in stackoverflow.
<link rel="stylesheet" href="http://sstatic.net/so/all.css?v=6274">
<script type="text/javascript" src="http://sstatic.net/so/js/master.js?v=6180"></script>
<script src="http://sstatic.net/so/js/question.js?v=6274" type="text/javascript"></script>
D...
I'm using page caching within my application. Everything works fine locally. But after I push changes to heroku server. Caching expiration won't work. I use sweepers to track and expire cached pages.
Here's config for caching in the production.rb
config.cache_store = :memory_store
#config.cache_store = :file_store, 'tmp/cache/'
I trie...
Hot can I use cache do command inside module?
Example
module MyModule
def self.some_method(str)
cache str do
... some code ...
end
end
end
Thx!
...
I have a PHP script that simply takes some data, separates it into tab delimited format, saves it as an .xls file, and then gives user a link to download it.
Works well most of the time, but some people are getting cached versions of the exported .xls file.
What I am thinking I need to do is instead of giving user a direct link to the ...
I'm working on a PHP content management system and, in testing, have noticed that quite a few of the system's MySQL tables are queried on almost every page but are very rarely written to. What I'm wondering is will this start to weigh heavily on the database as site traffic increases, and how can I solve/prevent this?
My initial thought...
I'm using Enterprise Library's DAAB. I have code like this:
Database dBase = DatabaseFactory.CreateDatabase();
DbCommand dCommand = dBase.GetStoredProcCommand(StoredProcedureName, Parameters);
dCommand.CommandTimeout = CommandTimeout;
return dBase.ExecuteDataSet(dCommand);
How can I clear the paramete...
I have two virtual hosts within my apache config, one for live and one for preview. In the moment there is no setting about cache and for all live customers, this is fine. But the preview customer with a lot of changes have some cache problems within the last weeks. I am not sure if this is an IE problem or not - anyway, I would like to ...
Suppose we are building an E-commerce site that allows consumers to search for products by typing in keywords. Say there are at most 200,000 products, and there are millions of consumers using the system. Let’s say the product table is updated fairly frequently. Since the number of products is not that high and we can probably store the ...
I am building an ASP.NET application. Within each ASPX page, we are outputting inline snippets of HTML that are pulled from static text files. Similar to the example shown here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=331
As in the article, we store the contents of the files in HttpRuntime.Cache with a CacheDependency pointing t...
Hi Guys,
I have a quick question I'm just not sure about. I'm trying to increase performance on an intranet site. I'm trying to limit the trips to the database by implementing some caching. I'm new to caching and I wasn't sure is this shared across users? I'm hoping it's unique to the individual user. Like every user would have their ow...
Hi there,
I've got a sweeper that's supposed to expire a few action caches. Even though the debugger stops immediately before the call to expire_action, it's not actually expiring the action. Any idea what could be going on?
Here are the relevant sweeper and controller.
#company_sweeper.rb (in 'models' directory)
class CompanySweeper ...
Hello,
I develop coldFusion applications on my laptop with it's own ColdFusion 8 server with IIS which run on Windows Vista. I am having a rather annoying problem.
The problem is whenever I make any changes to my CFC's, it appears that unless I restart my ColdFusion Application server, the changes to my CFC's will not take effect unti...
Hi All,
This is two questions in one but hopefully trivial to a C++ developer.
How can I seralize an object so that I can write it to disk and retrieve it later in C++ or if this is the wrong keyword how can I write an object as a binary stream and recreate it later? Can I use inheritance to make a hierarchy of classes serializable?
w...
We are building an ASP.NET MVC application which will be deployed behind a hardware load balancer that supports, among other things, caching.
Our proposal is to manually define which URL patterns should be cached by the load balancer. This will be quite an easy process for us as we have 'catalogue' pages which are relatively static, the...
Lets consider two almost identical codes:
First
for (int k=0;k<1000;k++)
{
for (int i=0;i<600;i++)
{
for (int j=0;j<600;j++)
{
tab[i][j] = i *j;
}
}
}
Second
for (int k=0;k<1000;k++)
{
for (int i=0;i<600;i++)
{
for (int j=0;j<600;j++)
{
t...
I'm using an ODS(ObjectDataSource) backed-up with a Linq-To-SQL class to populate Gridview on my page.
Considering the performance - I've disabled the Viewstate of the Gridview and enabled caching in the ODS.
Apart from this, I've also optimized the Search method in the Linq-to-SQL class to use the .skip & .take methods to fetch only a...