For a wider vew of this topic, see Accounting Basics and Understanding Accounting Methods.
It's possible to use one method for tax purposes and the other for accounting purposes. However, as usual with tax issues, nothing is that simple. Consult with a professional tax advisor for the best tax method for you. But for accounting purposes, always use the accrual-based method.