Hope you brought cash for last weekend’s Target run. Customers across the country were faced with back-to-back outages over the weekend, the second of which left stores unable to process credit or debit card payments.

On Saturday, shoppers took to social media, posting pictures of long lines and full carts, along with exhortations not to take out their frustrations on the cashiers. Saturday afternoon, the company announced via Twitter, “Target’s registers are fully back online and guests are able to purchase their merchandise again in all stores.” The company said the outage was due to an “internal technology” issue. A second, unrelated, incident occurred Sunday, a result of an outage with Target’s payment-processing company NCR. Customers posted pictures on social media of signs over card readers that said, “cash only,” and complained about having to pay fees to access cash at the in-store ATMs.

Personal finance experts said the weekend’s events are a good reminder that even if cash is no longer king, it pays to keep some on hand anyway.

“It’s just a reminder that we have to carry a nominal amount of cash even if we have no plans to use it, because you just never know when you might be in a pinch,” Greg McBride, chief financial analyst at Bankrate.com, said.

“It makes you realize how dependent we are on plastic as a method of payment and all the incentives that are provided around it,” he said, pointing out that Target’s private-label REDcard gives customers a 5 percent discount on most purchases when they use it.

Americans swipe a lot of plastic. According to WalletHub, there are a combined total of 636 million credit cards issued by Visa, MasterCard, Discover, and American Express — a figure that doesn’t even include store-brand credit cards. In a survey conducted last year, payments processor TSYS found that 54 percent of respondents prefer to pay with debit cards, up 10 percentage points in just one year. Counterintuitively, though, the percentage of people who prefer cash rose by five percentage points, to 14 percent from a 2014 low of 9 percent.

“Cash is still quite prevalent, particularly for small dollar transactions,” McBride said.

A study of consumer behavior published last year by the Federal Reserve Bank of San Francisco bears this out, finding that shoppers use cash for 30 percent of all transactions, including 55 percent of purchases for less than $10.

For larger purchases, though, the playing field shifts. The study found that people use cash for 32 percent of transactions between $10 and $24.99, and debit cards for 34 percent of purchases in that price range. In 2017, when the data behind the study was collected, there was a sea change of sorts in that it was the first time plastic edged out cash for transactions of this size.

“You can’t carry too much cash, simply because of the risk involved, whether it’s theft or loss,” McBride said.

A survey by American Consumer Credit Counseling found that 80 percent of shoppers use debit cards for “everyday” purchases, like groceries and gas. The proliferation of platforms like Square has also helped spread the ubiquity of card usage, especially for smaller transactions, said Bruce McClary, spokesman for the National Foundation for Credit Counseling.

“There are fewer circumstances where you absolutely have to have cash,” he said. “Now even street food vendors can accept debit and credit payments using a card reader and a smartphone.”