modifs.mineures sans commentaires
This commit is contained in:
		
							parent
							
								
									0b8c39a35c
								
							
						
					
					
						commit
						990533a906
					
				
							
								
								
									
										8
									
								
								src/cache/CacheChannel.php
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								src/cache/CacheChannel.php
									
									
									
									
										vendored
									
									
								
							| @ -63,7 +63,7 @@ class CacheChannel extends CapacitorChannel { | ||||
|     ]); | ||||
|   } | ||||
| 
 | ||||
|   function onCreate($item, array $values, ?array $alwaysNull, ?string $duration=null): ?array { | ||||
|   function onCreate($item, array $row, ?array $alwaysNull, ?string $duration=null): ?array { | ||||
|     $now = new DateTime(); | ||||
|     $duration ??= $this->duration; | ||||
|     return [ | ||||
| @ -72,7 +72,7 @@ class CacheChannel extends CapacitorChannel { | ||||
|     ]; | ||||
|   } | ||||
| 
 | ||||
|   function onUpdate($item, array $values, array $pvalues, ?string $duration=null): ?array { | ||||
|   function onUpdate($item, array $row, array $prow, ?string $duration=null): ?array { | ||||
|     $now = new DateTime(); | ||||
|     $duration ??= $this->duration; | ||||
|     return [ | ||||
| @ -97,9 +97,9 @@ class CacheChannel extends CapacitorChannel { | ||||
|     $found = false; | ||||
|     $expired = false; | ||||
|     $this->each($cacheIds, | ||||
|       function($item, $values) use (&$found, &$expired) { | ||||
|       function($row) use (&$found, &$expired) { | ||||
|         $found = true; | ||||
|         $expired = $values["duration"]->isElapsed(); | ||||
|         $expired = $row["duration"]->isElapsed(); | ||||
|       }); | ||||
|     return !$found || $expired; | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user