A CAERPHILLY drug dealer has been jailed for 40 months after being caught by police with thousands of pounds worth of cannabis, cocaine and ecstasy.