INNER CODE UNIT · Kotlin

saveBufferoo

bufferapp/android-clean-architecture-boilerplate · cache/src/main/java/org/buffer/android/boilerplate/cache/BufferooCacheImpl.kt:93

    private fun saveBufferoo(cachedBufferoo: CachedBufferoo) {
        database.insert(Db.BufferooTable.TABLE_NAME, null, mapper.toContentValues(cachedBufferoo))
    }

    /**
     * Checked whether there are instances of [CachedBufferoo] stored in the cache
     */
    override fun isCached(): Boolean {
        return database.rawQuery(BufferooConstants.QUERY_GET_ALL_BUFFEROOS, null).count > 0
    }

    /**
     * Set a point in time at when the cache was last updated
     */
    override fun setLastCacheTime(lastCache: Long) {
        preferencesHelper.lastCacheTime = lastCache
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…