From a50019d5a814875a4bd7c80333ca129d1ed69582 Mon Sep 17 00:00:00 2001 From: Orka Arnest CRUZE Date: Mon, 2 Dec 2024 17:19:59 +0100 Subject: [PATCH] =?UTF-8?q?perf:=20mise=20en=20cache=20de=20requ=C3=AAtes?= =?UTF-8?q?=20get=20users/me=20et=20datastore/$datastoreId=20+=20nettoyage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- json/getAllDetailed.json | 895 ------------------ json/getAllWithFields.json | 273 ------ src/Security/KeycloakUserProvider.php | 19 +- .../EntrepotApi/BaseEntrepotApiService.php | 4 +- .../EntrepotApi/DatastoreApiService.php | 7 +- .../EntrepotApi/StoredDataApiService.php | 96 +- src/Services/EntrepotApi/UserApiService.php | 4 +- 7 files changed, 28 insertions(+), 1270 deletions(-) delete mode 100644 json/getAllDetailed.json delete mode 100644 json/getAllWithFields.json diff --git a/json/getAllDetailed.json b/json/getAllDetailed.json deleted file mode 100644 index a8a39b80..00000000 --- a/json/getAllDetailed.json +++ /dev/null @@ -1,895 +0,0 @@ -{ - "name": "Hydrographie des Ardennes", - "nb_publications": 5, - "thumbnail": null, - "vector_db_list": [ - { - "name": "hydro-ardennes-l93_gpkg_11-03-2024", - "type": "VECTOR-DB", - "visibility": "PRIVATE", - "srs": "EPSG:2154", - "contact": "sylvain.lafay@ign.fr", - "extent": { - "geometry": { - "type": "MultiPolygon", - "coordinates": [ - [ - [ - [5.5571875, 47.94089844], - [5.5571875, 47.9815625], - [5.478125, 47.9815625], - [5.478125, 48.02222656], - [5.478125, 48.06289063], - [5.478125, 48.10355469], - [5.478125, 48.14421875], - [5.5571875, 48.14421875], - [5.5571875, 48.18488281], - [5.5571875, 48.22554687], - [5.5571875, 48.26621094], - [5.63625, 48.26621094], - [5.63625, 48.306875], - [5.63625, 48.34753906], - [5.63625, 48.38820312], - [5.63625, 48.42886719], - [5.63625, 48.46953125], - [5.63625, 48.51019531], - [5.63625, 48.55085938], - [5.63625, 48.59152344], - [5.63625, 48.6321875], - [5.63625, 48.67285156], - [5.5571875, 48.67285156], - [5.5571875, 48.71351562], - [5.5571875, 48.75417969], - [5.478125, 48.75417969], - [5.478125, 48.71351562], - [5.478125, 48.67285156], - [5.3990625, 48.67285156], - [5.3990625, 48.71351562], - [5.3990625, 48.75417969], - [5.3990625, 48.79484375], - [5.32, 48.79484375], - [5.32, 48.83550781], - [5.32, 48.87617187], - [5.2409375, 48.87617187], - [5.2409375, 48.91683594], - [5.161875, 48.91683594], - [5.161875, 48.87617187], - [5.0828125, 48.87617187], - [5.00375, 48.87617187], - [5.00375, 48.91683594], - [5.00375, 48.9575], - [4.9246875, 48.9575], - [4.9246875, 48.99816406], - [4.9246875, 49.03882813], - [4.845625, 49.03882813], - [4.845625, 49.07949219], - [4.845625, 49.12015625], - [4.7665625, 49.12015625], - [4.6875, 49.12015625], - [4.6875, 49.07949219], - [4.6084375, 49.07949219], - [4.529375, 49.07949219], - [4.529375, 49.12015625], - [4.4503125, 49.12015625], - [4.4503125, 49.16082031], - [4.37125, 49.16082031], - [4.37125, 49.20148437], - [4.37125, 49.24214844], - [4.37125, 49.2828125], - [4.2921875, 49.2828125], - [4.2921875, 49.24214844], - [4.213125, 49.24214844], - [4.213125, 49.2828125], - [4.213125, 49.32347656], - [4.1340625, 49.32347656], - [4.1340625, 49.36414062], - [4.055, 49.36414062], - [3.9759375, 49.36414062], - [3.896875, 49.36414062], - [3.8178125, 49.36414062], - [3.73875, 49.36414062], - [3.6596875, 49.36414062], - [3.580625, 49.36414062], - [3.5015625, 49.36414062], - [3.4225, 49.36414062], - [3.3434375, 49.36414062], - [3.264375, 49.36414062], - [3.1853125, 49.36414062], - [3.10625, 49.36414062], - [3.0271875, 49.36414062], - [3.0271875, 49.40480469], - [2.948125, 49.40480469], - [2.8690625, 49.40480469], - [2.8690625, 49.36414062], - [2.79, 49.36414062], - [2.79, 49.32347656], - [2.79, 49.2828125], - [2.7109375, 49.2828125], - [2.631875, 49.2828125], - [2.5528125, 49.2828125], - [2.5528125, 49.24214844], - [2.47375, 49.24214844], - [2.47375, 49.20148437], - [2.3946875, 49.20148437], - [2.3946875, 49.16082031], - [2.3946875, 49.12015625], - [2.315625, 49.12015625], - [2.2365625, 49.12015625], - [2.2365625, 49.07949219], - [2.2365625, 49.03882813], - [2.1575, 49.03882813], - [2.1575, 48.99816406], - [2.0784375, 48.99816406], - [2.0784375, 48.9575], - [1.999375, 48.9575], - [1.999375, 48.99816406], - [1.999375, 49.03882813], - [1.999375, 49.07949219], - [2.0784375, 49.07949219], - [2.1575, 49.07949219], - [2.1575, 49.12015625], - [2.1575, 49.16082031], - [2.2365625, 49.16082031], - [2.315625, 49.16082031], - [2.315625, 49.20148437], - [2.315625, 49.24214844], - [2.3946875, 49.24214844], - [2.3946875, 49.2828125], - [2.47375, 49.2828125], - [2.47375, 49.32347656], - [2.5528125, 49.32347656], - [2.5528125, 49.36414062], - [2.631875, 49.36414062], - [2.7109375, 49.36414062], - [2.7109375, 49.40480469], - [2.79, 49.40480469], - [2.79, 49.44546875], - [2.79, 49.48613281], - [2.8690625, 49.48613281], - [2.8690625, 49.52679688], - [2.948125, 49.52679688], - [2.948125, 49.56746094], - [3.0271875, 49.56746094], - [3.0271875, 49.608125], - [3.10625, 49.608125], - [3.1853125, 49.608125], - [3.1853125, 49.64878906], - [3.264375, 49.64878906], - [3.3434375, 49.64878906], - [3.3434375, 49.68945313], - [3.3434375, 49.73011719], - [3.3434375, 49.77078125], - [3.3434375, 49.81144531], - [3.4225, 49.81144531], - [3.4225, 49.85210937], - [3.4225, 49.89277344], - [3.5015625, 49.89277344], - [3.5015625, 49.9334375], - [3.580625, 49.9334375], - [3.6596875, 49.9334375], - [3.73875, 49.9334375], - [3.8178125, 49.9334375], - [3.896875, 49.9334375], - [3.9759375, 49.9334375], - [3.9759375, 49.97410156], - [4.055, 49.97410156], - [4.055, 50.01476563], - [4.1340625, 50.01476563], - [4.1340625, 50.05542969], - [4.213125, 50.05542969], - [4.2921875, 50.05542969], - [4.37125, 50.05542969], - [4.37125, 50.01476563], - [4.4503125, 50.01476563], - [4.4503125, 50.05542969], - [4.529375, 50.05542969], - [4.529375, 50.09609375], - [4.6084375, 50.09609375], - [4.6084375, 50.13675781], - [4.6084375, 50.17742188], - [4.6875, 50.17742188], - [4.6875, 50.21808594], - [4.7665625, 50.21808594], - [4.845625, 50.21808594], - [4.845625, 50.25875], - [4.9246875, 50.25875], - [4.9246875, 50.21808594], - [5.00375, 50.21808594], - [5.00375, 50.17742188], - [5.00375, 50.13675781], - [5.00375, 50.09609375], - [5.00375, 50.05542969], - [4.9246875, 50.05542969], - [4.9246875, 50.01476563], - [5.00375, 50.01476563], - [5.00375, 49.97410156], - [5.00375, 49.9334375], - [5.00375, 49.89277344], - [5.0828125, 49.89277344], - [5.0828125, 49.85210937], - [5.161875, 49.85210937], - [5.161875, 49.81144531], - [5.161875, 49.77078125], - [5.2409375, 49.77078125], - [5.32, 49.77078125], - [5.3990625, 49.77078125], - [5.3990625, 49.73011719], - [5.3990625, 49.68945313], - [5.3990625, 49.64878906], - [5.478125, 49.64878906], - [5.5571875, 49.64878906], - [5.5571875, 49.608125], - [5.478125, 49.608125], - [5.478125, 49.56746094], - [5.478125, 49.52679688], - [5.5571875, 49.52679688], - [5.5571875, 49.48613281], - [5.63625, 49.48613281], - [5.63625, 49.52679688], - [5.7153125, 49.52679688], - [5.7153125, 49.56746094], - [5.794375, 49.56746094], - [5.8734375, 49.56746094], - [5.8734375, 49.52679688], - [5.794375, 49.52679688], - [5.794375, 49.48613281], - [5.7153125, 49.48613281], - [5.7153125, 49.44546875], - [5.63625, 49.44546875], - [5.63625, 49.40480469], - [5.5571875, 49.40480469], - [5.5571875, 49.36414062], - [5.63625, 49.36414062], - [5.63625, 49.32347656], - [5.63625, 49.2828125], - [5.5571875, 49.2828125], - [5.5571875, 49.32347656], - [5.478125, 49.32347656], - [5.478125, 49.36414062], - [5.3990625, 49.36414062], - [5.32, 49.36414062], - [5.32, 49.32347656], - [5.32, 49.2828125], - [5.3990625, 49.2828125], - [5.3990625, 49.24214844], - [5.3990625, 49.20148437], - [5.3990625, 49.16082031], - [5.478125, 49.16082031], - [5.478125, 49.12015625], - [5.478125, 49.07949219], - [5.478125, 49.03882813], - [5.478125, 48.99816406], - [5.5571875, 48.99816406], - [5.5571875, 48.9575], - [5.5571875, 48.91683594], - [5.5571875, 48.87617187], - [5.5571875, 48.83550781], - [5.63625, 48.83550781], - [5.63625, 48.79484375], - [5.63625, 48.75417969], - [5.7153125, 48.75417969], - [5.7153125, 48.71351562], - [5.794375, 48.71351562], - [5.794375, 48.67285156], - [5.794375, 48.6321875], - [5.7153125, 48.6321875], - [5.7153125, 48.59152344], - [5.7153125, 48.55085938], - [5.794375, 48.55085938], - [5.794375, 48.51019531], - [5.794375, 48.46953125], - [5.7153125, 48.46953125], - [5.7153125, 48.42886719], - [5.7153125, 48.38820312], - [5.7153125, 48.34753906], - [5.7153125, 48.306875], - [5.7153125, 48.26621094], - [5.7153125, 48.22554687], - [5.63625, 48.22554687], - [5.63625, 48.18488281], - [5.63625, 48.14421875], - [5.63625, 48.10355469], - [5.5571875, 48.10355469], - [5.5571875, 48.06289063], - [5.5571875, 48.02222656], - [5.63625, 48.02222656], - [5.63625, 47.9815625], - [5.63625, 47.94089844], - [5.5571875, 47.94089844] - ], - [ - [5.5571875, 49.40480469], - [5.5571875, 49.44546875], - [5.478125, 49.44546875], - [5.478125, 49.48613281], - [5.3990625, 49.48613281], - [5.3990625, 49.44546875], - [5.3990625, 49.40480469], - [5.478125, 49.40480469], - [5.5571875, 49.40480469] - ], - [ - [5.32, 49.36414062], - [5.32, 49.40480469], - [5.32, 49.44546875], - [5.32, 49.48613281], - [5.2409375, 49.48613281], - [5.2409375, 49.44546875], - [5.2409375, 49.40480469], - [5.2409375, 49.36414062], - [5.32, 49.36414062] - ], - [ - [4.37125, 49.36414062], - [4.37125, 49.32347656], - [4.4503125, 49.32347656], - [4.529375, 49.32347656], - [4.529375, 49.36414062], - [4.4503125, 49.36414062], - [4.37125, 49.36414062] - ], - [ - [4.529375, 49.32347656], - [4.529375, 49.2828125], - [4.6084375, 49.2828125], - [4.6084375, 49.32347656], - [4.529375, 49.32347656] - ], - [ - [2.948125, 49.48613281], - [2.948125, 49.44546875], - [3.0271875, 49.44546875], - [3.10625, 49.44546875], - [3.1853125, 49.44546875], - [3.1853125, 49.40480469], - [3.264375, 49.40480469], - [3.3434375, 49.40480469], - [3.4225, 49.40480469], - [3.4225, 49.44546875], - [3.5015625, 49.44546875], - [3.580625, 49.44546875], - [3.580625, 49.40480469], - [3.6596875, 49.40480469], - [3.73875, 49.40480469], - [3.8178125, 49.40480469], - [3.8178125, 49.44546875], - [3.896875, 49.44546875], - [3.9759375, 49.44546875], - [3.9759375, 49.48613281], - [4.055, 49.48613281], - [4.055, 49.52679688], - [3.9759375, 49.52679688], - [3.9759375, 49.56746094], - [3.9759375, 49.608125], - [3.896875, 49.608125], - [3.896875, 49.56746094], - [3.8178125, 49.56746094], - [3.8178125, 49.608125], - [3.8178125, 49.64878906], - [3.896875, 49.64878906], - [3.9759375, 49.64878906], - [3.9759375, 49.68945313], - [3.896875, 49.68945313], - [3.8178125, 49.68945313], - [3.73875, 49.68945313], - [3.73875, 49.64878906], - [3.6596875, 49.64878906], - [3.580625, 49.64878906], - [3.5015625, 49.64878906], - [3.4225, 49.64878906], - [3.4225, 49.608125], - [3.3434375, 49.608125], - [3.3434375, 49.56746094], - [3.264375, 49.56746094], - [3.1853125, 49.56746094], - [3.10625, 49.56746094], - [3.10625, 49.52679688], - [3.0271875, 49.52679688], - [3.0271875, 49.48613281], - [2.948125, 49.48613281] - ], - [ - [4.2921875, 49.48613281], - [4.2921875, 49.44546875], - [4.37125, 49.44546875], - [4.37125, 49.48613281], - [4.2921875, 49.48613281] - ], - [ - [5.161875, 49.2828125], - [5.161875, 49.24214844], - [5.161875, 49.20148437], - [5.161875, 49.16082031], - [5.161875, 49.12015625], - [5.161875, 49.07949219], - [5.161875, 49.03882813], - [5.2409375, 49.03882813], - [5.2409375, 48.99816406], - [5.2409375, 48.9575], - [5.32, 48.9575], - [5.32, 48.91683594], - [5.3990625, 48.91683594], - [5.3990625, 48.87617187], - [5.3990625, 48.83550781], - [5.478125, 48.83550781], - [5.478125, 48.87617187], - [5.478125, 48.91683594], - [5.478125, 48.9575], - [5.3990625, 48.9575], - [5.3990625, 48.99816406], - [5.3990625, 49.03882813], - [5.3990625, 49.07949219], - [5.3990625, 49.12015625], - [5.32, 49.12015625], - [5.32, 49.16082031], - [5.32, 49.20148437], - [5.2409375, 49.20148437], - [5.2409375, 49.24214844], - [5.2409375, 49.2828125], - [5.2409375, 49.32347656], - [5.161875, 49.32347656], - [5.161875, 49.2828125] - ], - [ - [5.0828125, 48.9575], - [5.161875, 48.9575], - [5.161875, 48.99816406], - [5.0828125, 48.99816406], - [5.0828125, 48.9575] - ], - [ - [4.529375, 49.16082031], - [4.6084375, 49.16082031], - [4.6084375, 49.20148437], - [4.529375, 49.20148437], - [4.529375, 49.16082031] - ], - [ - [4.213125, 49.40480469], - [4.213125, 49.36414062], - [4.2921875, 49.36414062], - [4.2921875, 49.40480469], - [4.213125, 49.40480469] - ], - [ - [3.4225, 49.77078125], - [3.4225, 49.73011719], - [3.5015625, 49.73011719], - [3.580625, 49.73011719], - [3.6596875, 49.73011719], - [3.73875, 49.73011719], - [3.73875, 49.77078125], - [3.73875, 49.81144531], - [3.8178125, 49.81144531], - [3.896875, 49.81144531], - [3.9759375, 49.81144531], - [4.055, 49.81144531], - [4.055, 49.85210937], - [3.9759375, 49.85210937], - [3.896875, 49.85210937], - [3.896875, 49.89277344], - [3.8178125, 49.89277344], - [3.73875, 49.89277344], - [3.73875, 49.85210937], - [3.6596875, 49.85210937], - [3.580625, 49.85210937], - [3.5015625, 49.85210937], - [3.5015625, 49.81144531], - [3.5015625, 49.77078125], - [3.4225, 49.77078125] - ], - [ - [3.9759375, 49.77078125], - [3.896875, 49.77078125], - [3.896875, 49.73011719], - [3.9759375, 49.73011719], - [3.9759375, 49.77078125] - ] - ] - ] - }, - "type": "Feature" - }, - "size": 23609344, - "status": "GENERATED", - "last_event": { - "title": "Cr\u00e9ation", - "date": "2024-03-11T13:03:18.617511", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "tags": { - "proc_int_id": "2793c2f3-04a4-4c32-987d-51f5d7990e3c", - "upload_id": "0fbbb851-b652-4cd4-b1f7-0ab7a78e7d71", - "datasheet_name": "Hydrographie des Ardennes" - }, - "storage": { - "type": "POSTGRESQL", - "labels": ["WORLDLINE", "VECTEUR"] - }, - "_id": "4a11e5ff-7f41-412c-b821-06c30cdaf564", - "type_infos": { - "relations": [ - { - "name": "cours_d_eau", - "type": "TABLE", - "attributes": { - "geom": "geometry(MultiLineString,2154)", - "cleabs": "character varying(24)", - "statut": "character varying", - "ogc_fid": "integer", - "sources": "character varying(127)", - "toponyme": "character varying", - "importance": "character varying", - "date_creation": "timestamp with time zone", - "date_d_apparition": "date", - "date_modification": "timestamp with time zone", - "statut_du_toponyme": "character varying", - "caractere_permanent": "boolean", - "code_hydrographique": "character varying(19)", - "date_de_confirmation": "date", - "identifiants_sources": "character varying(254)", - "influence_de_la_maree": "boolean", - "commentaire_sur_l_objet_hydro": "character varying(70)" - }, - "primary_key": ["ogc_fid"] - }, - { - "name": "troncon_hydrographique", - "type": "TABLE", - "attributes": { - "geom": "geometry(LineStringZ,2154)", - "fosse": "boolean", - "cleabs": "character varying(24)", - "fictif": "boolean", - "nature": "character varying", - "statut": "character varying", - "ogc_fid": "integer", - "origine": "character varying", - "sources": "character varying(127)", - "salinite": "boolean", - "persistance": "character varying", - "code_du_pays": "character varying(8)", - "delimitation": "boolean", - "navigabilite": "boolean", - "type_de_bras": "character varying", - "date_creation": "timestamp with time zone", - "numero_d_ordre": "character varying(2)", - "etat_de_l_objet": "character varying", - "classe_de_largeur": "character varying", - "date_d_apparition": "date", - "date_modification": "timestamp with time zone", - "code_hydrographique": "character varying(19)", - "date_de_confirmation": "date", - "identifiants_sources": "character varying(254)", - "sens_de_l_ecoulement": "character varying", - "liens_vers_cours_d_eau": "character varying", - "precision_altimetrique": "double precision", - "precision_planimetrique": "double precision", - "strategie_de_classement": "character varying(30)", - "reseau_principal_coulant": "boolean", - "cpx_toponyme_de_cours_d_eau": "character varying", - "position_par_rapport_au_sol": "character varying", - "commentaire_sur_l_objet_hydro": "character varying(70)", - "code_du_cours_d_eau_bdcarthage": "character varying(8)", - "lien_vers_entite_de_transition": "character varying(24)", - "mode_d_obtention_de_l_altitude": "character varying", - "cpx_toponyme_d_entite_de_transi": "character varying", - "liens_vers_surface_hydrographiq": "character varying", - "mode_d_obtention_des_coordonnee": "character varying", - "perimetre_d_utilisation_ou_orig": "character varying(30)" - }, - "primary_key": ["ogc_fid"] - }, - { - "name": "detail_hydrographique", - "type": "TABLE", - "attributes": { - "geom": "geometry(Point,2154)", - "cleabs": "character varying(24)", - "nature": "character varying", - "ogc_fid": "integer", - "sources": "character varying(127)", - "toponyme": "character varying", - "importance": "character varying", - "date_creation": "timestamp with time zone", - "etat_de_l_objet": "character varying", - "nature_detaillee": "character varying", - "date_d_apparition": "date", - "date_modification": "timestamp with time zone", - "statut_du_toponyme": "character varying", - "date_de_confirmation": "date", - "identifiants_sources": "character varying(254)", - "precision_planimetrique": "double precision" - }, - "primary_key": ["ogc_fid"] - }, - { - "name": "plan_d_eau", - "type": "TABLE", - "attributes": { - "geom": "geometry(MultiPolygon,2154)", - "cleabs": "character varying(24)", - "nature": "character varying", - "statut": "character varying", - "ogc_fid": "integer", - "sources": "character varying(127)", - "toponyme": "character varying", - "importance": "character varying", - "date_creation": "timestamp with time zone", - "altitude_moyenne": "double precision", - "date_d_apparition": "date", - "date_modification": "timestamp with time zone", - "statut_du_toponyme": "character varying", - "caractere_permanent": "boolean", - "code_hydrographique": "character varying(19)", - "date_de_confirmation": "date", - "identifiants_sources": "character varying(254)", - "influence_de_la_maree": "boolean", - "hauteur_d_eau_maximale": "double precision", - "commentaire_sur_l_objet_hydro": "character varying(70)", - "mode_d_obtention_de_la_hauteur": "character varying", - "mode_d_obtention_de_l_altitude_": "character varying", - "precision_de_l_altitude_moyenne": "character varying", - "referentiel_de_l_altitude_moyen": "character varying(30)" - }, - "primary_key": ["ogc_fid"] - } - ] - } - } - ], - "pyramid_list": [], - "upload_list": [ - { - "name": "hydro-ardennes-l93_gpkg_11-03-2024", - "description": "hydro-ardennes-l93_gpkg_11-03-2024", - "type": "VECTOR", - "visibility": "PRIVATE", - "status": "CLOSED", - "srs": "EPSG:2154", - "contact": "sylvain.lafay@ign.fr", - "extent": { - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [50.14999126, 5.85207475], - [50.14999126, 5.51164709], - [50.20860209, 5.51164709], - [50.20860209, 3.94585195], - [50.14999126, 3.94585195], - [50.14999126, 2.05521083], - [47.99992957, 2.05521083], - [47.99992957, 5.85207475], - [50.14999126, 5.85207475] - ] - ] - }, - "type": "Feature" - }, - "size": 29323264, - "last_event": { - "title": "Fermeture", - "date": "2024-03-11T13:01:41.085079", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "tags": { - "proc_int_id": "2793c2f3-04a4-4c32-987d-51f5d7990e3c", - "datasheet_name": "Hydrographie des Ardennes", - "vectordb_id": "4a11e5ff-7f41-412c-b821-06c30cdaf564", - "data_upload_path": "cf360fb4-10b7-4b11-8a5f-decde478bc7c/hydro-ardennes-l93.gpkg", - "integration_progress": "{\u0022send_files_api\u0022:\u0022successful\u0022,\u0022wait_checks\u0022:\u0022successful\u0022,\u0022integration_processing\u0022:\u0022successful\u0022}", - "integration_current_step": "3" - }, - "_id": "0fbbb851-b652-4cd4-b1f7-0ab7a78e7d71", - "type_infos": [] - } - ], - "service_list": [ - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs", - "type": "WFS", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs", - "type": "WFS", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "PUBLICATION", - "text": "PUBLICATION", - "date": "2024-06-11T06:34:35.531921", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "_id": "d4934231-1c75-4794-8e31-1a696f6dfac6", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "used_data": [ - { - "relations": [ - { - "native_name": "cours_d_eau", - "public_name": "cours_d_eau", - "title": "cours_d_eau", - "abstract": "Cours d\u0027eau" - } - ], - "expose_primary_key": false, - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ] - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WFS principal", - "_id": "ae012611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WFS", - "url": "https://data.geopf.fr/wfs?service=WFS\u0026version=2.0.0\u0026request=DescribeFeatureType\u0026typeNames=hydro-ardennes-l93_gpkg_11-03-2024_wfs:cours_d_eau" - } - ], - "_id": "7b04714e-d69e-48ae-bc80-378e9d71f70f", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wfs/capabilities.xml" - }, - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs3", - "type": "WFS", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs3", - "type": "WFS", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "Synchronisation", - "text": "Synchronisation des informations de configuration et de donn\u00e9es", - "date": "2024-06-11T11:55:17.611515", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "_id": "21b61932-d192-4aa2-bd56-46de27ce453a", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "used_data": [ - { - "relations": [ - { - "native_name": "plan_d_eau", - "public_name": "plan_d_eau", - "title": "plan_d_eau", - "abstract": "Plans d\u0027eau des Ardennes" - } - ], - "expose_primary_key": false, - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ] - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WFS principal", - "_id": "ae012611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WFS", - "url": "https://data.geopf.fr/wfs?service=WFS\u0026version=2.0.0\u0026request=DescribeFeatureType\u0026typeNames=hydro-ardennes-l93_gpkg_11-03-2024_wfs3:plan_d_eau" - } - ], - "_id": "0e35bedb-9e7e-4676-8dc2-955fec64e1c4", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wfs/capabilities.xml" - }, - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wmsv", - "type": "WMS-VECTOR", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wmsv", - "type": "WMS-VECTOR", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "Synchronisation", - "text": "Synchronisation des informations de configuration et de donn\u00e9es", - "date": "2024-10-18T12:04:03.267794", - "initiator": { - "last_name": "Cruze", - "first_name": "Orka Arnest", - "_id": "0790f02b-4bed-495e-a070-e127031350eb" - } - }, - "_id": "4ced2595-36f1-40df-a64e-2f6ee2639145", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "title": "hydro-ardennes-l93", - "keywords": ["Hydrographie"], - "used_data": [ - { - "relations": [ - { - "name": "cours_d_eau", - "style": "c34752fc-e113-4ca7-9cba-ab9abc2a1a28" - }, - { - "name": "detail_hydrographique", - "style": "ede509e0-cf22-4cae-a647-481813c2d72c" - }, - { - "name": "troncon_hydrographique", - "style": "80d2aee9-a776-4c35-b5f4-3ff94ca51384" - } - ], - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ], - "abstract": "Hydrographie des Ardennes" - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WMS Vecteur principal", - "_id": "ae022611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WMS", - "url": "https://data.geopf.fr/wms-v?service=WMS\u0026version=1.3.0\u0026request=GetMap\u0026layers=hydro-ardennes-l93_gpkg_11-03-2024_wmsv\u0026bbox={xmin},{ymin},{xmax},{ymax}\u0026styles={styles}\u0026width={width}\u0026height={height}\u0026srs={srs}\u0026format={format}" - } - ], - "_id": "413c8b68-1679-46c8-856e-676b54a184e2", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wms-v/capabilities.xml" - } - ] -} diff --git a/json/getAllWithFields.json b/json/getAllWithFields.json deleted file mode 100644 index 35a5cd83..00000000 --- a/json/getAllWithFields.json +++ /dev/null @@ -1,273 +0,0 @@ -{ - "name": "Hydrographie des Ardennes", - "nb_publications": 5, - "thumbnail": null, - "vector_db_list": [ - { - "name": "hydro-ardennes-l93_gpkg_11-03-2024", - "type": "VECTOR-DB", - "visibility": "PRIVATE", - "srs": "EPSG:2154", - "status": "GENERATED", - "contact": "sylvain.lafay@ign.fr", - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "size": 23609344, - "last_event": { - "title": "Cr\u00e9ation", - "date": "2024-03-11T13:03:18.617511", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "tags": { - "proc_int_id": "2793c2f3-04a4-4c32-987d-51f5d7990e3c", - "upload_id": "0fbbb851-b652-4cd4-b1f7-0ab7a78e7d71", - "datasheet_name": "Hydrographie des Ardennes" - }, - "_id": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ], - "pyramid_list": [], - "upload_list": [ - { - "type": "VECTOR", - "name": "hydro-ardennes-l93_gpkg_11-03-2024", - "visibility": "PRIVATE", - "srs": "EPSG:2154", - "description": "hydro-ardennes-l93_gpkg_11-03-2024", - "status": "CLOSED", - "contact": "sylvain.lafay@ign.fr", - "bbox": { - "west": 47.9999295746, - "south": 2.055210834, - "east": 50.208602094, - "north": 5.8520747499 - }, - "size": 29323264, - "last_event": { - "title": "Fermeture", - "date": "2024-03-11T13:01:41.085079", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "tags": { - "proc_int_id": "2793c2f3-04a4-4c32-987d-51f5d7990e3c", - "datasheet_name": "Hydrographie des Ardennes", - "vectordb_id": "4a11e5ff-7f41-412c-b821-06c30cdaf564", - "data_upload_path": "cf360fb4-10b7-4b11-8a5f-decde478bc7c/hydro-ardennes-l93.gpkg", - "integration_progress": "{\u0022send_files_api\u0022:\u0022successful\u0022,\u0022wait_checks\u0022:\u0022successful\u0022,\u0022integration_processing\u0022:\u0022successful\u0022}", - "integration_current_step": "3" - }, - "_id": "0fbbb851-b652-4cd4-b1f7-0ab7a78e7d71" - } - ], - "service_list": [ - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs", - "type": "WFS", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs", - "type": "WFS", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "PUBLICATION", - "text": "PUBLICATION", - "date": "2024-06-11T06:34:35.531921", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "_id": "d4934231-1c75-4794-8e31-1a696f6dfac6", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "used_data": [ - { - "relations": [ - { - "native_name": "cours_d_eau", - "public_name": "cours_d_eau", - "title": "cours_d_eau", - "abstract": "Cours d\u0027eau" - } - ], - "expose_primary_key": false, - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ] - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WFS principal", - "_id": "ae012611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WFS", - "url": "https://data.geopf.fr/wfs?service=WFS\u0026version=2.0.0\u0026request=DescribeFeatureType\u0026typeNames=hydro-ardennes-l93_gpkg_11-03-2024_wfs:cours_d_eau" - } - ], - "_id": "7b04714e-d69e-48ae-bc80-378e9d71f70f", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wfs/capabilities.xml" - }, - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs3", - "type": "WFS", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wfs3", - "type": "WFS", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "Synchronisation", - "text": "Synchronisation des informations de configuration et de donn\u00e9es", - "date": "2024-06-11T11:55:17.611515", - "initiator": { - "last_name": "Prevautel", - "first_name": "Philippe", - "_id": "af187a95-bb83-47c7-aa01-951d324e5282" - } - }, - "_id": "21b61932-d192-4aa2-bd56-46de27ce453a", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "used_data": [ - { - "relations": [ - { - "native_name": "plan_d_eau", - "public_name": "plan_d_eau", - "title": "plan_d_eau", - "abstract": "Plans d\u0027eau des Ardennes" - } - ], - "expose_primary_key": false, - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ] - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WFS principal", - "_id": "ae012611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WFS", - "url": "https://data.geopf.fr/wfs?service=WFS\u0026version=2.0.0\u0026request=DescribeFeatureType\u0026typeNames=hydro-ardennes-l93_gpkg_11-03-2024_wfs3:plan_d_eau" - } - ], - "_id": "0e35bedb-9e7e-4676-8dc2-955fec64e1c4", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wfs/capabilities.xml" - }, - { - "open": true, - "available": true, - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wmsv", - "type": "WMS-VECTOR", - "status": "PUBLISHED", - "configuration": { - "name": "hydro-ardennes-l93", - "layer_name": "hydro-ardennes-l93_gpkg_11-03-2024_wmsv", - "type": "WMS-VECTOR", - "status": "PUBLISHED", - "tags": { - "datasheet_name": "Hydrographie des Ardennes" - }, - "last_event": { - "title": "Synchronisation", - "text": "Synchronisation des informations de configuration et de donn\u00e9es", - "date": "2024-10-18T12:04:03.267794", - "initiator": { - "last_name": "Cruze", - "first_name": "Orka Arnest", - "_id": "0790f02b-4bed-495e-a070-e127031350eb" - } - }, - "_id": "4ced2595-36f1-40df-a64e-2f6ee2639145", - "metadata": [], - "type_infos": { - "bbox": { - "west": 1.999375, - "south": 47.940898437, - "east": 5.8734375, - "north": 50.25875 - }, - "title": "hydro-ardennes-l93", - "keywords": ["Hydrographie"], - "used_data": [ - { - "relations": [ - { - "name": "cours_d_eau", - "style": "c34752fc-e113-4ca7-9cba-ab9abc2a1a28" - }, - { - "name": "detail_hydrographique", - "style": "ede509e0-cf22-4cae-a647-481813c2d72c" - }, - { - "name": "troncon_hydrographique", - "style": "80d2aee9-a776-4c35-b5f4-3ff94ca51384" - } - ], - "stored_data": "4a11e5ff-7f41-412c-b821-06c30cdaf564" - } - ], - "abstract": "Hydrographie des Ardennes" - }, - "styles": [] - }, - "endpoint": { - "name": "Service de diffusion WMS Vecteur principal", - "_id": "ae022611-13eb-4a18-8d04-9b7604a031cc" - }, - "urls": [ - { - "type": "WMS", - "url": "https://data.geopf.fr/wms-v?service=WMS\u0026version=1.3.0\u0026request=GetMap\u0026layers=hydro-ardennes-l93_gpkg_11-03-2024_wmsv\u0026bbox={xmin},{ymin},{xmax},{ymax}\u0026styles={styles}\u0026width={width}\u0026height={height}\u0026srs={srs}\u0026format={format}" - } - ], - "_id": "413c8b68-1679-46c8-856e-676b54a184e2", - "share_url": "https://data.geopf.fr/annexes/cartes-gouv-dev/gpf-geoserver-wms-v/capabilities.xml" - } - ] -} diff --git a/src/Security/KeycloakUserProvider.php b/src/Security/KeycloakUserProvider.php index b6a1c24e..55b95e8e 100644 --- a/src/Security/KeycloakUserProvider.php +++ b/src/Security/KeycloakUserProvider.php @@ -20,6 +20,8 @@ use Symfony\Component\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserProviderInterface; +use Symfony\Contracts\Cache\CacheInterface; +use Symfony\Contracts\Cache\ItemInterface; /** * @implements UserProviderInterface @@ -32,6 +34,7 @@ public function __construct( private ParameterBagInterface $params, private UserApiService $userApiService, private LoggerInterface $logger, + private CacheInterface $cache, ) { } @@ -78,12 +81,16 @@ public function loadUser(): User throw new AuthenticationExpiredException('Failed to fetch user from token', Response::HTTP_UNAUTHORIZED, $th); } - try { - $apiUser = $this->userApiService->getMe(); - } catch (TimeoutException $ex) { - $this->logger->debug('{class}: Failed to fetch logged-in user', ['class' => self::class]); - throw new UserNotFoundException('Failed to fetch logged-in user', Response::HTTP_UNAUTHORIZED, $ex); - } + $apiUser = $this->cache->get('users-me', function (ItemInterface $item) { + $item->expiresAfter(60); + + try { + return $this->userApiService->getMe(); + } catch (TimeoutException $ex) { + $this->logger->debug('{class}: Failed to fetch logged-in user', ['class' => self::class]); + throw new UserNotFoundException('Failed to fetch logged-in user', Response::HTTP_UNAUTHORIZED, $ex); + } + }); $user = new User($keycloakUser->toArray(), $apiUser); diff --git a/src/Services/EntrepotApi/BaseEntrepotApiService.php b/src/Services/EntrepotApi/BaseEntrepotApiService.php index a0b1b156..1ccda0f8 100644 --- a/src/Services/EntrepotApi/BaseEntrepotApiService.php +++ b/src/Services/EntrepotApi/BaseEntrepotApiService.php @@ -10,6 +10,7 @@ use Symfony\Component\HttpClient\Exception\JsonException; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; +use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; @@ -20,7 +21,8 @@ public function __construct( ParameterBagInterface $parameters, Filesystem $filesystem, RequestStack $requestStack, - LoggerInterface $logger + protected CacheInterface $cache, + LoggerInterface $logger, ) { parent::__construct($httpClient, $parameters, $filesystem, $requestStack, $logger, 'api_entrepot_url'); } diff --git a/src/Services/EntrepotApi/DatastoreApiService.php b/src/Services/EntrepotApi/DatastoreApiService.php index 93cec3cc..fbb47516 100644 --- a/src/Services/EntrepotApi/DatastoreApiService.php +++ b/src/Services/EntrepotApi/DatastoreApiService.php @@ -4,12 +4,17 @@ use App\Exception\ApiException; use Symfony\Component\HttpFoundation\Response; +use Symfony\Contracts\Cache\ItemInterface; class DatastoreApiService extends BaseEntrepotApiService { public function get(string $datastoreId): array { - return $this->request('GET', "datastores/$datastoreId"); + return $this->cache->get("datastore-$datastoreId", function (ItemInterface $item) use ($datastoreId) { + $item->expiresAfter(60); + + return $this->request('GET', "datastores/$datastoreId"); + }); } /** diff --git a/src/Services/EntrepotApi/StoredDataApiService.php b/src/Services/EntrepotApi/StoredDataApiService.php index 15382537..46cbe18f 100644 --- a/src/Services/EntrepotApi/StoredDataApiService.php +++ b/src/Services/EntrepotApi/StoredDataApiService.php @@ -2,11 +2,11 @@ namespace App\Services\EntrepotApi; -use App\Constants\EntrepotApi\StoredDataTypes; use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; class StoredDataApiService extends BaseEntrepotApiService @@ -17,11 +17,9 @@ public function __construct( Filesystem $filesystem, RequestStack $requestStack, LoggerInterface $logger, - private ProcessingApiService $processingApiService, - private ConfigurationApiService $configurationApiService, - private AnnexeApiService $annexeApiService, + protected CacheInterface $cache, ) { - parent::__construct($httpClient, $parameters, $filesystem, $requestStack, $logger); + parent::__construct($httpClient, $parameters, $filesystem, $requestStack, $cache, $logger); } /** @@ -59,36 +57,6 @@ public function get(string $datastoreId, string $storedDataId): array return $this->request('GET', "datastores/$datastoreId/stored_data/$storedDataId"); } - public function getDetailed(string $datastoreId, string $storedDataId): array - { - $storedData = $this->get($datastoreId, $storedDataId); - - // fetch information specific to the type of stored data - if (StoredDataTypes::VECTOR_DB == $storedData['type']) { - if (array_key_exists('proc_int_id', $storedData['tags'])) { - $vectordbProcInt = $this->processingApiService->getExecution($datastoreId, $storedData['tags']['proc_int_id']); - $storedData['input_upload_id'] = $vectordbProcInt['inputs']['upload'][0]['_id']; - } - } elseif (StoredDataTypes::ROK4_PYRAMID_VECTOR == $storedData['type']) { - $offerings = $this->configurationApiService->getAllOfferings($datastoreId, [ - 'stored_data' => $storedData['_id'], - ]); - - // check if pyramid is already published or not - if (0 == count($offerings)) { - $storedData['tags']['published'] = false; - } else { - $storedData['tags']['published'] = true; - } - } - - if (array_key_exists('last_event', $storedData)) { - $storedData['last_event']['date_text'] = (new \DateTime($storedData['last_event']['date'], new \DateTimeZone('Europe/Paris')))->format('d/m/y H\hi'); // d F Y - } - - return $storedData; - } - public function modifyName(string $datastoreId, string $storedDataId, string $newName): array { return $this->request('PATCH', "datastores/$datastoreId/stored_data/$storedDataId", [ @@ -118,62 +86,4 @@ public function removeTags(string $datastoreId, string $storedDataId, $tags): ar 'tags' => $tags, ]); } - - /** - * Recupere les tags de style (styles et default_style) dans la storedData. - */ - public function getTagStyles(string $datastoreId, string $storedDataId): array - { - $storedData = $this->get($datastoreId, $storedDataId); - - $styles = []; - $defaultStyle = null; - - if (isset($storedData['tags']['styles'])) { - $styles = json_decode($storedData['tags']['styles'], true); - } - - if (isset($storedData['tags']['default_style'])) { - $defaultStyle = $storedData['tags']['default_style']; - } elseif (count($styles)) { // S'il n'est pas dans les tags, on prend le dernier - $name = array_key_last($styles); - $defaultStyle = $styles[$name]; - } - - return ['styles' => $styles, 'default_style' => $defaultStyle]; - } - - /** - * Recupere les tags de style (styles et default_style) dans la storedData et ajoute l'url - * pour chaque annexe. - */ - public function getStyles(string $datastoreId, string $storedDataId): array - { - $storedData = $this->get($datastoreId, $storedDataId); - - $styles = []; - $defaultStyle = null; - if (isset($storedData['tags']['styles'])) { - $tagStyles = json_decode($storedData['tags']['styles'], true); - foreach ($tagStyles as $id => $name) { - $annexe = $this->annexeApiService->get($datastoreId, $id); - $styles[$id] = ['name' => $name, 'url' => $annexe['paths'][0]]; - } - } - - if (isset($storedData['tags']['default_style'])) { - $defaultStyle = $storedData['tags']['default_style']; - } elseif (count($styles)) { // S'il n'est pas dans les tags, on prend le dernier - $defaultStyle = array_key_last($styles); - } - - // On met le style par defaut au debut - if (!is_null($defaultStyle)) { - $defStyle = [$defaultStyle => $styles[$defaultStyle]]; - unset($styles[$defaultStyle]); - $styles = array_merge($defStyle, $styles); - } - - return ['styles' => $styles, 'defaultStyle' => $defaultStyle]; - } } diff --git a/src/Services/EntrepotApi/UserApiService.php b/src/Services/EntrepotApi/UserApiService.php index 6f579521..f123af02 100644 --- a/src/Services/EntrepotApi/UserApiService.php +++ b/src/Services/EntrepotApi/UserApiService.php @@ -7,6 +7,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; class UserApiService extends BaseEntrepotApiService @@ -18,8 +19,9 @@ public function __construct( RequestStack $requestStack, LoggerInterface $logger, private DatastoreApiService $datastoreApiService, + protected CacheInterface $cache, ) { - parent::__construct($httpClient, $parameters, $filesystem, $requestStack, $logger); + parent::__construct($httpClient, $parameters, $filesystem, $requestStack, $cache, $logger); } public function getMe(): array