Move Global Functions - Part 3
- Replaced every CACHE definition - Moved check_url to App->checkURL() - Removed unused definition "ZCURL_TIMEOUT"
This commit is contained in:
		
					parent
					
						
							
								ec9f1563f9
							
						
					
				
			
			
				commit
				
					
						4392858662
					
				
			
		
					 16 changed files with 43 additions and 70 deletions
				
			
		| 
						 | 
				
			
			@ -468,7 +468,7 @@ class GContact
 | 
			
		|||
			* Uncommented because the result of the queries are to big to store it in the cache.
 | 
			
		||||
			* We need to decide if we want to change the db column type or if we want to delete it.
 | 
			
		||||
			*/
 | 
			
		||||
			//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $r, CACHE_FIVE_MINUTES);
 | 
			
		||||
			//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $r, Cache::FIVE_MINUTES);
 | 
			
		||||
 | 
			
		||||
			return $r;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -509,7 +509,7 @@ class GContact
 | 
			
		|||
		* Uncommented because the result of the queries are to big to store it in the cache.
 | 
			
		||||
		* We need to decide if we want to change the db column type or if we want to delete it.
 | 
			
		||||
		*/
 | 
			
		||||
		//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $list, CACHE_FIVE_MINUTES);
 | 
			
		||||
		//Cache::set("suggestion_query:".$uid.":".$start.":".$limit, $list, Cache::FIVE_MINUTES);
 | 
			
		||||
		return $list;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -253,7 +253,7 @@ class Photo
 | 
			
		|||
					DBA::escape(L10n::t('Contact Photos'))
 | 
			
		||||
				);
 | 
			
		||||
			}
 | 
			
		||||
			Cache::set($key, $albums, CACHE_DAY);
 | 
			
		||||
			Cache::set($key, $albums, Cache::DAY);
 | 
			
		||||
		}
 | 
			
		||||
		return $albums;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -265,7 +265,7 @@ class Photo
 | 
			
		|||
	public static function clearAlbumCache($uid)
 | 
			
		||||
	{
 | 
			
		||||
		$key = "photo_albums:".$uid.":".local_user().":".remote_user();
 | 
			
		||||
		Cache::set($key, null, CACHE_DAY);
 | 
			
		||||
		Cache::set($key, null, Cache::DAY);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -577,7 +577,7 @@ class Profile
 | 
			
		|||
			);
 | 
			
		||||
			if (DBA::isResult($s)) {
 | 
			
		||||
				$r = DBA::toArray($s);
 | 
			
		||||
				Cache::set($cachekey, $r, CACHE_HOUR);
 | 
			
		||||
				Cache::set($cachekey, $r, Cache::HOUR);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1037,7 +1037,7 @@ class Profile
 | 
			
		|||
			logger('URL ' . $my_url . ' already tried to authenticate.', LOGGER_DEBUG);
 | 
			
		||||
			return;
 | 
			
		||||
		} else {
 | 
			
		||||
			Cache::set($cachekey, true, CACHE_MINUTE);
 | 
			
		||||
			Cache::set($cachekey, true, Cache::MINUTE);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		logger('Not authenticated. Invoking reverse magic-auth for ' . $my_url, LOGGER_DEBUG);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue