Session lastactivity improved

main
Inga 🏳‍🌈 14 years ago
parent bf6b405d9a
commit 9b3b058e1a
  1. 2
      Builder/IISMainHandler/build.txt
  2. 4
      Common/dataobjects/Session.cs

@ -122,12 +122,14 @@ namespace FLocal.Common.dataobjects {
} }
public void updateLastActivity(string lastUrl) { public void updateLastActivity(string lastUrl) {
if(DateTime.Now.Subtract(this.lastActivity).TotalSeconds < 10) return; //to partially remove db load
if(lastUrl != null) { if(lastUrl != null) {
string _url = lastUrl.ToLower(); string _url = lastUrl.ToLower();
if(_url.StartsWith("/upload/item")) return; if(_url.StartsWith("/upload/item")) return;
if(_url.StartsWith("/static")) return; if(_url.StartsWith("/static")) return;
if(_url.StartsWith("/favicon.ico")) return; if(_url.StartsWith("/favicon.ico")) return;
if(DateTime.Now.Subtract(this.lastHumanActivity).TotalSeconds < 10) return; //to partially remove db load
} else {
if(DateTime.Now.Subtract(this.lastActivity).TotalSeconds < 10) return; //to partially remove db load
} }
try { try {
Dictionary<string, string> dataToUpdate = new Dictionary<string,string>(); Dictionary<string, string> dataToUpdate = new Dictionary<string,string>();

Loading…
Cancel
Save