Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong failure-msg when clearing photo-cache. #1375

Merged
merged 2 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.6.0 - 2025.01.10 Georeferenced photos from external folders not shown on map
## 1.6.0 - [unreleased]
### Added
- Scan photos of specific directory [#1231](https://github.com/nextcloud/maps/pull/1231) @tetebueno

### Fixed
- Georeferenced photos from external folders not shown on map
[#1371](https://github.com/nextcloud/maps/issues/1371) @umgfoin
- Fix wrong failure-msg. when clearing photo-cache
[#1375](https://github.com/nextcloud/maps/pull/1375) @umgfoin


## 1.5.0 - 2024.11.16 Nextcloud Hub 9
Expand Down
15 changes: 10 additions & 5 deletions lib/Service/GeophotoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ public function __construct(
* @return bool
*/
public function clearCache(string $userId = ''): bool {
$a = $this->photosCache->clear($userId);
$b = $this->timeOrderedPointSetsCache->clear($userId);
$c = $this->backgroundJobCache->clear('recentlyAdded:'.$userId);
$d = $this->backgroundJobCache->clear('recentlyUpdated:'.$userId);
return $a and $b and $c and $d;
try {
$this->photosCache->clear($userId);
$this->timeOrderedPointSetsCache->clear($userId);
$this->backgroundJobCache->clear('recentlyAdded:'.$userId);
$this->backgroundJobCache->clear('recentlyUpdated:'.$userId);
return true;

} catch (\Exception $e) {
return false;
}
}

/**
Expand Down
Loading