Given a compact metric space $(\Omega,d)$ equipped with a non-atomic, probability measure $m$ and a positive decreasing function $\psi$, we consider a natural class of lim sup subsets $\Lambda(\psi)$ of $\Omega$. The classical lim sup set $W(\psi)$ of $\p$-approximable' numbers in the theory of metric Diophantine approximation fall within this class. We establish sufficient conditions (which are also necessary under some natural assumptions) for the $m$-measure of $\Lambda(\psi)$ to be either positive or full in $\Omega$ and for the Hausdorff $f$-measure to be infinite.The classical theorems of Khintchine-Groshev and Jarnik concerning $W(\psi)$ fall into our general framework. The main results provide a unifying treatment of numerous problems in metric Diophantine approximation including those for real, complex and $p$-adic fields associated with both independent and dependent quantities. Applications also include those to Kleinian groups and rational maps. Compared to previous works our framework allows us to successfully remove many unnecessary conditions and strengthen fundamental results such as Jarnik's theorem and the Baker-Schmidt theorem. In particular, the strengthening of Jarnik's theorem opens up the Duffin-Schaeffer conjecture for Hausdorff measures.