My project uses a BME280 for measuring temperature and humidity. This device requires 2 capacitors but also thermal decoupling from the rest of the board.
Because I won't be doing a copper fill near the BME280, I need to decide whether the caps should be closer to the ground plane or closer to the sensor.
The whole loop is that matters. If one part of the loop is bad, the whole loop is bad.
Read about
* lengthy wiring
* wiring impedance
* area enclosed by the loop
....